Why V2?
The V2 wallet trades endpoint is a complete rewrite that addresses several pain points from V1:- Lighter responses:
baseToken/quoteTokenreturn only essential metadata (address, name, symbol, logo, decimals) instead of 100+ fields with volumes, trending scores, and market stats - Built-in pagination: Response includes a
paginationobject withpage,offset,limit, andpageEntries - Consistent naming: All fields use camelCase (no more mixed
snake_caseandcamelCase) - Consistent params: Same parameter names as other V2 wallet endpoints (
blockchains,from/to,order,offset/limit) - Token filtering: New
tokenAddressparameter to filter trades involving a specific token - Date as timestamp:
datereturns millisecond timestamps (number) instead of ISO strings
Endpoint Changes
| V1 | V2 | |
|---|---|---|
| GET | /api/1/wallet/trades | /api/2/wallet/trades |
| POST | Not supported | /api/2/wallet/trades |
Parameter Mapping
| V1 Parameter | V2 Parameter | Notes |
|---|---|---|
wallet | wallet | Same |
wallets | wallets | Same |
blockchains | blockchains | Same (comma-separated) |
from | from | Same (timestamp in ms) |
to | to | Same (timestamp in ms) |
limit | limit | Default changed: V1 varies, V2 = 50 (max 100) |
offset | offset | Same |
order | order | Same (asc/desc) |
page | - | Removed (use offset instead, page is computed in response) |
asset | tokenAddress | Now uses contract address instead of asset name |
cache | - | Removed |
recheckContract | - | Removed |
unlistedAssets | - | Removed (V2 returns all trades) |
trades | - | Removed |
stale | - | Removed |
onlyAssets | - | Removed (use tokenAddress instead) |
pagination | - | Removed (always paginated in V2) |
Response Field Mapping
Trade object
| V1 Field | V2 Field | Notes |
|---|---|---|
side | type | Same values: "buy" / "sell" |
swap_type | operation | Lowercased (e.g., "regular" instead of "REGULAR") |
amount_usd | baseTokenAmountUSD | Same value |
amount_base | baseTokenAmount | Same value |
amount_quote | quoteTokenAmount | Same value |
amount_base_raw | baseTokenAmountRaw | Same value |
amount_quote_raw | quoteTokenAmountRaw | Same value |
base | baseToken.address | Was a string, now inside object |
quote | quoteToken.address | Was a string, now inside object |
base_token | baseToken | Was 100+ fields, now only: address, name, symbol, logo, decimals |
pool_address | marketAddress | Renamed |
transaction_hash | transactionHash | camelCase |
transaction_sender_address | transactionSenderAddress | camelCase |
date | date | Changed: ISO string -> timestamp in ms |
chain_id | blockchain | Changed: chain ID (e.g., "evm:1") -> name (e.g., "Ethereum") |
price_usd_token0 / price_usd_token1 | baseTokenPriceUSD / quoteTokenPriceUSD | Oriented to base/quote instead of token0/token1 |
raw_pre_balance0 / raw_pre_balance1 | preBalanceBaseToken / preBalanceQuoteToken | Oriented to base/quote |
raw_post_balance0 / raw_post_balance1 | postBalanceBaseToken / postBalanceQuoteToken | Oriented to base/quote |
labels | labels | Same |
walletMetadata | - | Removed in V2 |
| - | id | New: unique trade identifier |
| - | swapSenderAddress | New: separate from transaction sender |
| - | swapRecipient | New: swap beneficiary (important for AA wallets) |
Pagination
V1 returns all matching trades in a flat array. V2 always returns paginated results with offset-based pagination (same as/wallet/activity and /wallet/positions):
page is computed as Math.floor(offset / limit) + 1. Use offset and limit to paginate.