Swaps on every chain
const url = 'https://api.getchord.xyz/v1/portfolio/example/activity?chains=all&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/portfolio/example/activity?chains=all&limit=50'The wallet’s swaps on every chain in scope, merged newest first, one keyset page at a time. Each item is one side of a swap seen from the wallet: buy = it received token, sell = it gave it.
Notes
- Pass the page’s
cursorback ascursorfor the next page;cursor: null= nothing older. One transaction’s rows stay on one page, so a page can hold fewer thanlimititems. - A chain that could not be read for a page is listed in
unavailableand keeps its place: the next page asks it again.items: []withunavailableset is an outage, not an empty history. - How far back: Monad, Robinhood Chain and Arc, their raw tape (45 days); Avalanche, Base, BNB Chain, Arbitrum One and Ethereum, their raw tape and then, where Chord’s history lake holds older days, up to 5,000 older swaps; Solana, 45 days. EVM swaps under $0.10 are left out.
tsis in milliseconds.- Pages are not cached: without an API key (or an Ask session) each page counts against the budget it shares with
GET /portfolio/{wallet}(10 new reads per IP every 10 minutes, a limited number a minute for every such caller together); past it 429RATE_LIMITEDor 503BUSYwithRetry-After.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”EVM address, hex, case-insensitive.
Query Parameters
Section titled “Query Parameters”Solana address, base58, case-sensitive. Never lower-case it.
The wallet’s Solana address. Adds Solana to the default scope.
all = the eight EVM chains, plus Solana when sol is given. Or a comma list of chain ids (143, 4663, 5042, 43114, 8453, 56, 42161, 1) and solana (which needs sol). Answered in registry order, Solana last. This route does not read chain: chain=5042 on its own still answers for every chain, so send chains=5042 for Arc alone.
The cursor of the previous page.
Items per page.
Responses
Section titled “ Responses ”object
Newest first, every chain in scope merged.
One side of one swap.
object
Unix time, milliseconds.
EVM chain id, or solana.
buy = the wallet received token; sell = it gave it.
object
EVM token, lower-case. Null on a Solana row.
Solana only, case kept.
Whole tokens, decimal string.
Transaction hash, or the Solana signature (case kept).
The transaction on the chain’s explorer.
Venue display name.
Opaque. Pass it back for the next page; null = nothing older.
Present only when a chain could not be read for this page.
object
EVM chain id, or solana.
Example
{ "items": [ { "side": "buy" } ]}INVALID_ADDRESS, INVALID_SOL_ADDRESS, BAD_CHAINS, SOL_REQUIRED, BAD_LIMIT (1 to 100) or BAD_CURSOR (not a cursor of this 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"}RATE_LIMITED: without an API key, this IP started its 10 new portfolio reads of the last 10 minutes, pages included (Retry-After). Or RATE_LIMIT_EXCEEDED, the per-minute limit of every 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"}BUSY: too many new portfolio reads are running for callers without a key right now (Retry-After). UNAVAILABLE: the page itself could not be built (a chain that cannot be read is listed in unavailable inside a 200).
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"}