Candles
const url = 'https://api.getchord.xyz/v1/tokens/chart/example?tf=1m';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/tokens/chart/example?tf=1m'OHLCV candles from Chord’s own tape, address-keyed — one call serves Arc and Robinhood Chain tokens (addresses cannot collide). 200 candles per page; before pages backwards for unlimited history. A token that is not on a curated list and not a side of an indexed pool is 404 UNKNOWN_TOKEN. For live candles subscribe on /v1/ws/live (see Streaming).
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”EVM address, hex, case-insensitive.
Query Parameters
Section titled “Query Parameters”Timeframe.
Unix time, seconds, UTC.
Return the 200 candles before this time (paging).
Responses
Section titled “ Responses ”object
Oldest first.
object
Unix time, seconds, UTC.
USD volume in the bucket.
db = Chord’s tape.
Example
{ "candles": [ { "t": 1789520400, "o": 76161.46230007616, "h": 93752.28222071448, "l": 73286.91828508611, "c": 73301.06410779823, "v": 22676.53 }, { "t": 1789524000, "o": 73332.39663202444, "h": 75694.61170208515, "l": 73332.39663202444, "c": 75694.61170208515, "v": 173955.23 } ], "tf": "1h", "source": "db"}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"}