# Market Data

## List Tradable Symbols

```
GET /api/v1/symbols
```

Returns a `data` array with the following fields per item:

| Field                 | Type    | Description                                          |
| --------------------- | ------- | ---------------------------------------------------- |
| `symbol`              | string  | Stock symbol, e.g., `AAPL`.                          |
| `contractAddress`     | string  | On-chain token contract address.                     |
| `contractSymbol`      | string  | Contract symbol.                                     |
| `contractName`        | string  | Contract name.                                       |
| `decimals`            | number  | Contract decimals.                                   |
| `onChainDecimals`     | number  | On-chain decimals.                                   |
| `tradable`            | boolean | Whether tradable.                                    |
| `fractionable`        | boolean | Whether fractional shares supported.                 |
| `overnightTradable`   | boolean | Whether overnight session supported.                 |
| `fractionalEhEnabled` | boolean | Whether fractional extended-hours trading supported. |
| `price`               | number  | Latest price.                                        |
| `change24H`           | number  | 24h price change.                                    |
| `change24HPercent`    | number  | 24h price change percentage.                         |
| `logoUrl`             | string  | Logo URL.                                            |
| `lastUpdateTimestamp` | number  | Cache update time (Unix seconds).                    |
| `name`                | string  | Company name.                                        |
| `pdfUrl`              | string  | Prospectus / PDF URL.                                |
| `volume24H`           | number  | 24h volume.                                          |

***

## Real-Time Quote

```
GET /api/v1/prices/{symbol}
```

### Path Parameters

| Parameter | Type   | Description                                                                           |
| --------- | ------ | ------------------------------------------------------------------------------------- |
| `symbol`  | string | Stock symbol, token symbol, or token address. Server trims and converts to uppercase. |

### Response `data` Structure

| Field       | Type          | Description                                                  |
| ----------- | ------------- | ------------------------------------------------------------ |
| `basicInfo` | object        | Underlying stock quote and basic info (chain-agnostic).      |
| `onChain`   | object / null | On-chain token info for the current `chainId + productType`. |

***

## Historical K-Line

```
GET /api/v1/prices/{symbol}/history
```

### Query Parameters

| Parameter    | Type   | Required | Default | Description                                                           |
| ------------ | ------ | -------- | ------- | --------------------------------------------------------------------- |
| `startTime`  | number | No       | —       | Start time (Unix seconds).                                            |
| `endTime`    | number | Yes      | —       | End time (Unix seconds).                                              |
| `interval`   | string | Yes      | —       | K-line interval. Enum: `1m`, `3m`, `5m`, `15m`, `1h`, `1d`, `1w`.     |
| `adjustment` | string | No       | `all`   | Adjustment type. Enum: `raw`, `split`, `dividend`, `spin-off`, `all`. |
| `limit`      | number | No       | `100`   | Max return count. Server max `5000`.                                  |

### Response Data

| Field       | Type   | Description                 |
| ----------- | ------ | --------------------------- |
| `open`      | number | Open price.                 |
| `high`      | number | High price.                 |
| `low`       | number | Low price.                  |
| `close`     | number | Close price.                |
| `volume`    | number | Volume.                     |
| `timestamp` | number | K-line time (Unix seconds). |

***

## Underlying Stock Quote

```
GET /api/v1/underlying/{symbol}/price
```

Returns underlying stock `basicInfo`:

| Field                 | Type    | Description                            |
| --------------------- | ------- | -------------------------------------- |
| `symbol`              | string  | Stock symbol.                          |
| `contractAddress`     | string  | Associated token contract address.     |
| `contractSymbol`      | string  | Contract symbol.                       |
| `onChainDecimals`     | number  | On-chain decimals.                     |
| `name`                | string  | Company name.                          |
| `exchange`            | string  | Exchange.                              |
| `status`              | string  | Symbol status: `active` or `inactive`. |
| `price`               | number  | Latest price.                          |
| `change24H`           | number  | 24h price change.                      |
| `change24HPercent`    | number  | 24h price change percentage.           |
| `volume24H`           | number  | 24h volume.                            |
| `tradable`            | boolean | Whether tradable.                      |
| `fractionable`        | boolean | Whether fractional shares supported.   |
| `lastUpdateTimestamp` | number  | Cache update time (Unix seconds).      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.anchored.finance/trading-api-docs-en/api-reference/market-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
