Trade history
GET
/portfolio/{wallet}/trades
const url = 'https://api.getchord.xyz/v1/portfolio/example/trades?chain=5042';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/trades?chain=5042'The wallet’s buys and sells on the chain, newest first — the markers on a portfolio chart.
Portfolio routes answer an empty 200 shape rather than a 5xx when the tape read fails — treat an empty tokens list as “nothing yet” and retry later.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”wallet
required
EVM address, hex, case-insensitive.
string
Query Parameters
Section titled “Query Parameters”chain
integer
Chain id: 5042 Arc · 4663 Robinhood Chain · 143 Monad. Omitted = 143.
Responses
Section titled “ Responses ”Media typeapplication/json
object
trades
Array<object>
object
t
Unix time, seconds, UTC.
integer
side
string
usd
number
tokenAmt
number
token
EVM address, hex, case-insensitive.
string
symbol
string | null
tx
Transaction hash.
string
updatedAt
Unix time, milliseconds — when the server built this answer.
integer
Example
{ "trades": [ { "t": 1789890946, "side": "buy", "usd": 198, "tokenAmt": 5293562.144446149, "token": "0x08adbf431569a1aacac2606d2adcd18f4ebf2a71", "symbol": "GLITCH", "tx": "0x25c5fd4de14a7592e39f0b803538cdbe1601a927f630da46fe9107c3afc89f83" }, { "t": 1789890762, "side": "buy", "usd": 297, "tokenAmt": 8471531.758406071, "token": "0x08adbf431569a1aacac2606d2adcd18f4ebf2a71", "symbol": "GLITCH", "tx": "0xf261bcb6c8d8bf3fe9debbd9f012396c8e025eafbcb047d40c5ee66013df9ef9" } ], "updatedAt": 1789891871018}Invalid parameters — error names the check that failed (INVALID_PARAMS, BAD_ADDRESS, BAD_LIMIT, BAD_HOURS, …).
Media typeapplication/json
Every non-2xx body.
object
error
required
Stable machine code, e.g. INVALID_PARAMS, NOT_READY, RATE_LIMIT_EXCEEDED.
string
message
For humans.
string
statusCode
HTTP status, when included.
integer
Example
{ "error": "INVALID_PARAMS", "message": "amount must be an integer string in the token's smallest unit"}