A wallet's swaps
const url = 'https://api.getchord.xyz/v1/chains/avalanche/wallet/example/trades?limit=50';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/wallet/example/trades?limit=50'The wallet’s swaps on the chain, newest first, each with the token and its symbol. Keyset-paged: pass nextBefore back as before for the next page; nextBefore is null on the last one.
The list covers the raw tape only: the last few days the database keeps on these chains (about 3 on BNB Chain and Base, 7 on Avalanche today). window.fromTs is where it starts. Older days are counted in the wallet route named by olderHistory, as totals per token, not as a list. Say how far back the list goes when you show it.
walleton a trade is the address the tape attributed it to; a swap sent through a router that the tape could not attribute is not in the list.- Trades under the chain’s ingest floor are not in the tape (BNB Chain: $100).
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.
Wallet address.
Query Parameters
Section titled “Query Parameters”Newest rows.
Exclusive cursor: the previous page’s nextBefore (ts:block:logIndex), or a Unix second.
Responses
Section titled “ Responses ”object
EVM address, hex, case-insensitive.
The span the list can cover. fromTs null = the chain has no raw day yet.
object
Unix time, seconds, UTC.
Unix time, seconds, UTC.
Always raw: this list never reads the data lake.
Newest first.
object
Unix time, seconds, UTC.
Transaction hash.
EVM address, hex, case-insensitive.
Whole tokens.
Cursor for the next page; null when this page is not full.
Path of the wallet route that counts the days before window.fromTs.
The tape’s ingest floor. BNB Chain runs at $100 today; Avalanche and Base at 0.
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.
Example
{ "chain": 56, "wallet": "0x2cf971cb78b7a3cdc0b2044a11abd7392b796c2d", "window": { "fromTs": 1791417600, "toTs": 1791746566 }, "history": "raw", "trades": [ { "ts": 1791746543, "tx": "0x330db50d0c397734e4d61fc2659b053527a9076f516b00050d4cceed47cf9c7e", "logIndex": 50, "block": 127074619, "token": "0x4fa7c69a7b69f8bc48233024d546bc299d6b03bf", "side": "sell", "tokenAmt": 950204.2671867504, "usd": 1519.2258102727808, "priceUsd": 0.0015988412836439056, "dex": "pancake_v3", "symbol": "quq" }, { "ts": 1791746523, "tx": "0x4e1457e8bdc7d83db90ce6fed43a8092f71814c57834ecad38ec4746b47c11c1", "logIndex": 45, "block": 127074574, "token": "0x4fa7c69a7b69f8bc48233024d546bc299d6b03bf", "side": "buy", "tokenAmt": 855183.3425646495, "usd": 1367.5757736974172, "priceUsd": 0.0015991609116194076, "dex": "pancake_v3", "symbol": "quq" } ], "nextBefore": "1791746523:127074574:45", "olderHistory": "/v1/chains/bnb/wallet/0x2cf971cb78b7a3cdc0b2044a11abd7392b796c2d", "ingestFloor": { "minTradeUsd": 100, "history": [ { "usd": 100, "fromTs": 1790789196 } ] }}UNSUPPORTED_CHAIN (unknown chain, a chain with its own routes, or a chain not served to this caller yet), or BAD_ADDRESS / BAD_LIMIT / BAD_BEFORE.
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"}NOT_READY (the chain’s rollup has not run on this deployment yet) or CHAIN_DATA_UNAVAILABLE (the store could not be read). 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"}