# User Guide

## 1. Getting Started

1. Open `dash.html` in a browser.
2. Enter your Finnhub API key when prompted.
3. Dashboard loads market status, indices, gainers/losers, and watchlists.

## 2. Main Tabs

- **Dashboard**: Live market overview.
- **Watchlists**: Create/edit watchlists and symbols.
- **API Test**: Verify API key and symbol responses.
- **Preferences**: Theme, precision, display toggles, interval, debug.

## 3. Watchlists

### 3.1 Managing lists

- Create named lists in the Watchlists tab.
- Add symbols (comma-separated supported).
- Remove symbols or delete list.

### 3.2 Dashboard watchlist cards

- Three watchlist cards are available.
- Each card selector can choose a watchlist or `None`.
- Selections are remembered across page refreshes.

## 4. API Test

- Enter a ticker (e.g., `MSFT`) in the symbol input.
- Click **Test**.
- Result panel shows quote response or error details.

## 5. Refresh and Status

- Use refresh button to fetch latest data.
- Status indicator shows loading/live/error.
- Last updated timestamp appears on dashboard.

## 6. Dow (DJI) Data Source

- The Dow card now prefers a local endpoint: `api/getDji.php?id=a6qja2`.
- If that endpoint is unavailable, the app falls back to provider quote APIs.
- This keeps the Dow value aligned with the MSN quote signal source.

## 6.1 Index Endpoint Coverage

- Dashboard indices now use endpoint-first fetch via `api/getIndex.php?index=<key>`.
- Supported keys: `dji`, `nasdaq`, `sp500`, `vix`.
- `dji`, `nasdaq`, and `sp500` are mapped to MSN IDs.
- `vix` is served by endpoint fallback data when MSN mapping is unavailable (Stooq, then FRED daily close fallback).

## 7. Scraper Quick Link

- In [scrapper.html](../scrapper.html), the **Open DJI JSON Endpoint** button opens the raw DJI payload in a new tab.
- Use this to quickly validate `close`, `change`, and `pct` values.

## 7.1 Dashboard Quick Links

- In dashboard Preferences -> API Keys, use **Index endpoint quick links** to open raw JSON for:
  - DJI
  - NASDAQ
  - S&P 500
  - VIX

## 8. Debug Console

- Enable debug mode in Preferences.
- Debug panel shows timestamped logs.
- Use controls for quick test and troubleshooting.

## 9. Troubleshooting

### Common issues

- **No data**: check internet/API key/rate limit.
- **Watchlist empty**: verify symbols in watchlist.
- **Storage not saved**: browser privacy settings may limit storage.

### Quick checks

- Re-test API in API Test tab.
- Verify selector is not set to `None`.
- Check debug logs for exact failing component.
