Candles (data API)
const url = 'https://api.getchord.xyz/v1/candles?chain=5042&token=example&tf=1m&limit=300&fill=1';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.getchord.xyz/v1/candles?chain=5042&token=example&tf=1m&limit=300&fill=1'OHLCV for any token Chord indexes on Arc, Robinhood Chain, Avalanche, Base, BNB Chain, Arbitrum, Ethereum or Monad, built only from Chord’s own index — never a third-party feed, so source is always index. 1m / 5m / 15m come from a 1-minute rollup that keeps history after raw trades are retired; 1h and above from the hourly rollup; the newest minutes straight from the tape. Each candle carries n, the trades in the bucket. Buckets without a trade are absent unless fill=1, which carries the previous close through them.
Paging: the default window ends with the still-open bucket (forming: true) and holds limit buckets. A from–to range wider than limit keeps the newest buckets; ask for the previous page with to = this page’s from. The token must trade on the chain you name — 404 UNKNOWN_TOKEN says which chain it trades on when it is another one. The zero address stands for the chain’s native asset (its wrapped twin, or the USDC predeploy on Arc). For live candles subscribe on /v1/ws/live (see Streaming).
Avalanche, Base, BNB Chain (43114, 8453, 56): candles come from chain-keyed tables, so one address on two chains is two tokens, and 404 UNKNOWN_TOKEN means no indexed trades on the chain you named. These chains answer once their tape runs and, until the chain is public, only to requests with an X-API-Key (400 UNSUPPORTED_CHAIN otherwise; all three are public today). Where the tape runs with an ingest floor (BNB Chain, $100 today) the response carries ingestFloor, and v and n count only trades at or above it.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”Chain id: 5042 Arc · 4663 Robinhood Chain · 43114 Avalanche C-Chain · 8453 Base · 56 BNB Chain · 42161 Arbitrum One · 1 Ethereum · 143 Monad. Omitted = 143.
EVM address, hex, case-insensitive.
Token address.
Timeframe.
Unix time, seconds, UTC.
Start, inclusive. Default: to minus limit buckets.
Unix time, seconds, UTC.
End, exclusive, snapped up to a bucket edge. Default: the end of the open bucket.
Buckets per page.
Carry the previous close through empty buckets (v = 0, n = 0).
Responses
Section titled “ Responses ”object
EVM address, hex, case-insensitive.
Always index.
Unix time, seconds, UTC.
Unix time, seconds, UTC.
The last candle is the still-open bucket.
Only on 43114 / 8453 / 56 when the tape runs with a floor (BNB Chain).
object
Trades under this USD value (at index time) are not in the index, so every count, volume and candle covers trades at or above it. 0 = every priced trade.
Floors in force over time, oldest first. Empty when the chain was never floored. Raising a floor does not remove older, smaller rows.
object
Floor in force.
Unix time, seconds, UTC.
Oldest first.
object
Unix time, seconds, UTC.
USD volume in the bucket.
Trades in the bucket.
Example
{ "chain": 5042, "token": "0x171a4217b86a807a64eb94757db6849fb4bdbaa0", "tf": "1h", "source": "index", "from": 1790704800, "to": 1790712000, "forming": true, "candles": [ { "t": 1790704800, "o": 83084.16874661468, "h": 83761.32352941176, "l": 82504.09836065574, "c": 83716.00512163893, "v": 236698.5, "n": 976 }, { "t": 1790708400, "o": 83676.16747181964, "h": 83758.25396825396, "l": 82970.76923076923, "c": 83590.35733333333, "v": 28901.4, "n": 212 } ]}Invalid parameters — error names the check that failed (INVALID_PARAMS, BAD_ADDRESS, BAD_LIMIT, BAD_HOURS, …).
Every non-2xx body.
object
Stable machine code, e.g. INVALID_PARAMS, NOT_READY, RATE_LIMIT_EXCEEDED.
For humans.
HTTP status, when included.
Example
{ "error": "INVALID_PARAMS", "message": "amount must be an integer string in the token's smallest unit"}Nothing at this identity (NOT_FOUND, UNKNOWN_TOKEN, NO_ROUTE).
Every non-2xx body.
object
Stable machine code, e.g. INVALID_PARAMS, NOT_READY, RATE_LIMIT_EXCEEDED.
For humans.
HTTP status, when included.
Example
{ "error": "INVALID_PARAMS", "message": "amount must be an integer string in the token's smallest unit"}The lane behind this endpoint is not ready or not enabled here (NOT_READY, CHAIN_NOT_ENABLED, NOT_ENABLED, *_UNAVAILABLE). Retry later; do not treat it as an empty answer.
Every non-2xx body.
object
Stable machine code, e.g. INVALID_PARAMS, NOT_READY, RATE_LIMIT_EXCEEDED.
For humans.
HTTP status, when included.
Example
{ "error": "INVALID_PARAMS", "message": "amount must be an integer string in the token's smallest unit"}