Reference price from CoinGecko
const url = 'https://api.getchord.xyz/v1/chains/avalanche/token/example/ref-price';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/chains/avalanche/token/example/ref-priceCoinGecko’s price and 24-hour change for a token by contract address, for a token Chord’s index has not seen trade (or to cross-check one it has). Not Chord’s own data: the answer says so in source. Cached two minutes; ageS is the age of the cached CoinGecko answer.
Chain-keyed data for Avalanche C-Chain, Base and BNB Chain, served from Chord’s rollup tables for the chain (every swap summed by hour, token and venue). Only the trade tape, the prints ticker and the wallet read raw rows, scoped to one token or one wallet and bounded.
- Access. No key needed while the chain is public (all three are today). A chain whose tape is off, or that is not public yet, answers
400 UNSUPPORTED_CHAIN(“chain N is not served yet”) unless the request carries anX-API-Key; those answers are sentCache-Control: private. - Ingest floor. Every count, volume and print covers trades at or above the chain’s floor, returned as
ingestFloor. BNB Chain runs at $100 today; Avalanche and Base at 0. - Readiness.
503 NOT_READYuntil the chain’s rollup has run on this deployment;503 CHAIN_DATA_UNAVAILABLEwhen the store cannot be read. Never treat either as “no trades”.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”The chain, by key or id: avalanche or 43114, base or 8453, bnb or 56, arbitrum or 42161, ethereum or 1 (case-insensitive). Arc, Robinhood Chain and Monad are refused with 400 UNSUPPORTED_CHAIN and a pointer to their own routes.
EVM address, hex, case-insensitive.
Token address. The zero address means the chain’s wrapped native token (WAVAX, WETH, WBNB).
Responses
Section titled “ Responses ”object
EVM address, hex, case-insensitive.
Seconds since CoinGecko answered.
Example
{ "chain": 56, "address": "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c", "priceUsd": 84397, "change24hPct": -2.11, "source": "coingecko", "ageS": 0}UNSUPPORTED_CHAIN (unknown chain, a chain with its own routes, or a chain not served to this caller yet), or BAD_ADDRESS.
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"}NOT_LISTED: CoinGecko does not list this token on this chain.
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"}Over the per-minute limit (RATE_LIMIT_EXCEEDED). Read X-RateLimit-Reset and back off.
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"}UNAVAILABLE: CoinGecko did not answer. Retry later.
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"}