Market History
market_historyBulk history for one coin, one metric per call, in pages: 'price' (OHLCV candles, spot or perp), 'open_interest' (market-wide aggregate USD), 'funding' (OI-weighted rate, %/8h and annualized) or 'liquidations' (market-wide long/short USD per bucket). Returns up to 'limit' rows (default 200, max 1000) at or before 'end' (default now), oldest first, as compact columns + rows; pass the returned nextEndMs as 'end' to fetch the page before it, and 'start' to stop there. Reach: price is full venue history (Binance spot from 2017, futures from 2019) at 1m–1w; derivatives come from CoinGlass at 4h (about 180 days back), 6h/8h/12h (about 360 days) or 1d/1w (back to 2020) — use 1d for anything older than six months. The newest row may still be forming (newestForming). Use this to pull history; for a read of what is happening now, use the derivatives_* and research_* tools.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Latest time to include: ISO-8601 or Unix ms. Default now. Pass nextEndMs here to page back. | |
| limit | No | Rows per page, 1–1000. Default 200. | |
| start | No | Earliest time to include: ISO-8601 (UTC if no offset) or Unix ms. Paging stops here. | |
| market | No | Price only: spot (default) or perpetual candles. | |
| metric | Yes | ||
| symbol | Yes | Coin symbol, e.g. "BTC". | |
| interval | No | Bucket size. Price: 1m–1w except 6h/8h, default 1d. Derivatives: 4h, 6h, 8h, 12h, 1d or 1w; default 4h (funding 8h). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| rows | Yes | Oldest first; each row is [timeMs, ...values] in column order; null where the source has no value | |
| count | Yes | ||
| endMs | No | The page's end bound, Unix ms | |
| units | No | What each value column means | |
| market | No | Price only: spot or perp | |
| metric | Yes | ||
| source | No | Provider that answered this page | |
| symbol | Yes | ||
| columns | Yes | Names of each row's cells; the first is timeMs (bucket open, Unix ms) | |
| startMs | No | ||
| interval | No | ||
| nextEndMs | No | Pass as 'end' for the page before this one; null when this page reached 'start' or the series' beginning | |
| newestForming | No | Newest row's bucket is still open; the vendor rewrites it until it closes | |
| earliestAvailableMs | No | Set when 'end' was before the plan's history edge for this interval |