> ## Documentation Index
> Fetch the complete documentation index at: https://tradewatch.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Price Data

> Real-time quotes, historical OHLC candles, raw tick data, and symbol discovery for stocks.

Stock price data is available at three levels of granularity: real-time quotes for the latest bid/ask, OHLC candles for aggregated historical analysis, and raw ticks for full-resolution historical replay. Use symbol discovery to find available instruments before querying price data.

## Endpoints

| Endpoint                     | Summary                 | Key use case                                    |
| ---------------------------- | ----------------------- | ----------------------------------------------- |
| `GET /stocks/quote`          | Last quote (single)     | Display current bid/ask for one symbol          |
| `GET /stocks/quotes`         | Last quotes (batch)     | Dashboard with multiple symbols at once         |
| `GET /stocks/{symbol}`       | Full stock snapshot     | Rich metadata + current price in one call       |
| `GET /stocks/{symbol}/ohlc`  | Historical OHLC candles | Charts, technical analysis, backtesting         |
| `GET /stocks/{symbol}/ticks` | Historical raw ticks    | Microstructure research, full-resolution replay |
| `GET /stocks/symbols`        | Symbol discovery        | Find available instruments                      |

## Last Quotes

**Endpoint:** `GET /stocks/quote` · `GET /stocks/quotes`

The quote endpoints return the most recent bid and ask prices for a symbol. `/stocks/quote` takes a single `symbol` query parameter; `/stocks/quotes` accepts a comma-separated `symbols` list for fetching multiple instruments in one request.

The `precision` parameter controls the number of decimal places in the response. Omit it to receive the full native precision.

**Key fields**

| Field       | Type    | What it means                              |
| ----------- | ------- | ------------------------------------------ |
| `bid`       | number  | Highest price a buyer is willing to pay    |
| `ask`       | number  | Lowest price a seller is willing to accept |
| `mid`       | number  | Midpoint between bid and ask               |
| `timestamp` | integer | Unix timestamp of the quote                |

**When to use**

* Displaying the current price of a stock on a dashboard or ticker
* Checking the latest price before placing a simulated trade
* Fetching prices for a portfolio of holdings in a single request (use `/quotes`)

**Example**

```bash theme={null}
curl "https://api.tradewatch.io/stocks/quote?symbol=AAPL" \
  -H "api-key: YOUR_API_KEY"
```

## Historical OHLC

**Endpoint:** `GET /stocks/{symbol}/ohlc`

Returns aggregated OHLC (Open, High, Low, Close) candles for a symbol in a selected resolution and time range. Both ask-side and bid-side OHLC values are returned. The `resolution` parameter specifies the candle width in seconds — for example, `60` for 1-minute candles, `3600` for 1-hour candles, `86400` for daily candles. `start` and `end` are Unix timestamps (inclusive and exclusive respectively).

**Key fields**

| Field                     | Type    | What it means                             |
| ------------------------- | ------- | ----------------------------------------- |
| `time`                    | integer | Unix timestamp of the candle open         |
| `open_ask` / `open_bid`   | number  | Opening ask/bid price for the period      |
| `high_ask` / `high_bid`   | number  | Highest ask/bid reached during the period |
| `low_ask` / `low_bid`     | number  | Lowest ask/bid reached during the period  |
| `close_ask` / `close_bid` | number  | Closing ask/bid price for the period      |

**When to use**

* Rendering price charts (candlestick or OHLC bar charts)
* Backtesting strategies against historical price data
* Computing technical indicators manually from raw OHLC values

**Example**

```bash theme={null}
# Daily candles for AAPL — adjust start/end Unix timestamps to your desired range
curl "https://api.tradewatch.io/stocks/AAPL/ohlc?resolution=86400&start=1714521600&end=1717113600" \
  -H "api-key: YOUR_API_KEY"
```

## Raw Ticks

**Endpoint:** `GET /stocks/{symbol}/ticks`

Returns every individual price tick for a symbol within a time range, using cursor pagination. Each tick contains the bid, ask, and mid price at a specific moment. Unlike OHLC, ticks are not aggregated — you receive every recorded price change.

**Key fields**

| Field  | Type   | What it means                  |
| ------ | ------ | ------------------------------ |
| `time` | string | ISO 8601 timestamp of the tick |
| `ask`  | number | Ask price at this moment       |
| `bid`  | number | Bid price at this moment       |
| `mid`  | number | Midpoint at this moment        |

**When to use**

* High-resolution backtesting where candle granularity is insufficient
* Microstructure research (spread analysis, intraday volatility)
* Building a local tick database for a specific symbol and period

Use OHLC instead of ticks when you only need aggregated price action — ticks produce much larger datasets for the same time range.

**Example**

```bash theme={null}
curl "https://api.tradewatch.io/stocks/AAPL/ticks?start=1717027200&end=1717113600&limit=100" \
  -H "api-key: YOUR_API_KEY"
```

## Symbol Discovery

**Endpoint:** `GET /stocks/symbols`

Returns a paginated list of available stock symbols. Use the `country` parameter to filter by market, `type` to filter by instrument type, and `cursor` to page through results.

**When to use**

* Building a symbol search or autocomplete feature
* Discovering which symbols are available for a specific market before requesting price data

**Example**

```bash theme={null}
# List US stocks, 50 per page
curl "https://api.tradewatch.io/stocks/symbols?country=US&size=50" \
  -H "api-key: YOUR_API_KEY"
```
