> For the complete documentation index, see [llms.txt](https://docs.flash.trade/flash-trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flash.trade/flash-trade/flash-trade-protocol/build-on-flash/flash-trade-v2/reference/market-data.md).

# Market data

Read-only market and account data. Shared conventions (base URL, units, errors): [Conventions](https://docs.flash.trade/flash-trade/flash-trade-protocol/build-on-flash/flash-trade-v2/reference/conventions).

{% hint style="info" %}
**This data is live and changes over time.** New markets and tokens go live as pools launch — treat `/pool-data`, `/tokens`, and `/prices` as the source of truth and read them at runtime instead of hardcoding market or token lists. See [Discover markets & stay current](https://docs.flash.trade/flash-trade/flash-trade-protocol/build-on-flash/flash-trade-v2/guides/discover-markets-and-stay-current).
{% endhint %}

| Method | Path                                                                                                           |
| ------ | -------------------------------------------------------------------------------------------------------------- |
| `GET`  | `/health`                                                                                                      |
| `GET`  | `/tokens`                                                                                                      |
| `GET`  | `/prices` · `/prices/{symbol}`                                                                                 |
| `GET`  | `/pool-data` · `/pool-data/{pubkey}`                                                                           |
| `GET`  | `/raw/pools` · `/raw/custodies` · `/raw/markets` · `/raw/perpetuals` (+ `/{pubkey}`) · `/raw/baskets/{pubkey}` |

***

### Health

`GET /health`

Service status, cached account counts, and live pool-config provenance.

```json
{
  "status": "ok",
  "accounts": { "pools": 1, "custodies": 6, "markets": 8, "baskets": 1200, "deposit_ledgers": 1300, "token_stakes": 900 },
  "config": {
    "source": "cdn",
    "version": "5864c583de7b9d17c5571c53cd679f572b340dad",
    "env": "mainnet", "branch": "main", "publishedAt": "2026-06-03T10:00:00Z",
    "builtAt": 1717407600, "pools": 1, "markets": 8, "tokens": 6
  }
}
```

`config.source` is `"cdn"` when the live pool config loaded from the CDN, or `"bundled"` on the SDK-bundled fallback (then `version`/`env`/`branch`/`publishedAt` may be `null`).

***

### Tokens

`GET /tokens`

All supported tokens (deduplicated across pools).

```json
[
  { "symbol": "SPY", "mint": "…", "decimals": 6, "isStable": false, "isVirtual": false, "isToken2022": true, "lazerId": 128 }
]
```

***

### Prices

`GET /prices`

Map of `symbol → price` for all supported tokens.

```json
{ "SPY": { "price": 54812000000, "exponent": -8, "confidence": 0, "priceUi": 548.12, "timestampUs": 1717407600000000, "marketSession": "regular" } }
```

| Field           | Type   | Description                                                     |
| --------------- | ------ | --------------------------------------------------------------- |
| `price`         | number | Raw integer price (apply `exponent`)                            |
| `exponent`      | number | Power-of-ten exponent (e.g. `-8`)                               |
| `confidence`    | number | Confidence interval (native units)                              |
| `priceUi`       | number | `price × 10^exponent`                                           |
| `timestampUs`   | number | Timestamp, microseconds                                         |
| `marketSession` | string | `regular` · `preMarket` · `postMarket` · `overNight` · `closed` |

#### `GET /prices/{symbol}` <a href="#prices-symbol" id="prices-symbol"></a>

| Param    | In   | Description                       |
| -------- | ---- | --------------------------------- |
| `symbol` | path | Token symbol (e.g. `SPY`, `MSTR`) |

`200` a single price object · `404` symbol not in the config, or no price yet.

***

### Pool data

`GET /pool-data`

Aggregated, cached pool statistics (TVL, utilization, LP price, per-custody/market caps). Returns `{ "pools": [ … ] }`; `{ "pools": [] }` before the cache first populates.

`GET /pool-data/{pubkey}` — single pool stats · `404` unknown pool.

***

### Raw accounts

Raw Anchor-deserialized on-chain account data — shapes mirror the program IDL. Each list item is `{ "pubkey": "…", "account": { … } }`.

| Endpoint                                           | Returns                             |
| -------------------------------------------------- | ----------------------------------- |
| `GET /raw/pools` · `/raw/pools/{pubkey}`           | Pool accounts                       |
| `GET /raw/custodies` · `/raw/custodies/{pubkey}`   | Custody accounts                    |
| `GET /raw/markets` · `/raw/markets/{pubkey}`       | Market accounts                     |
| `GET /raw/perpetuals` · `/raw/perpetuals/{pubkey}` | Perpetuals (global config) accounts |
| `GET /raw/baskets/{pubkey}`                        | A single raw basket account         |

`{pubkey}` variants return `404 { "error": "… not found" }` for unknown keys.

> There are no `/raw/positions` or `/raw/orders` endpoints — positions and orders live in the basket. Use [Account & positions](https://docs.flash.trade/flash-trade/flash-trade-protocol/build-on-flash/flash-trade-v2/reference/account-and-positions).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.flash.trade/flash-trade/flash-trade-protocol/build-on-flash/flash-trade-v2/reference/market-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
