Wallet Transactions
Returns a wallet's AMM legs across all tokens and mains, newest first in chain order, with cursor pagination. Rows are attributed to the wallet behind the trade (a hub-loan exit is listed under the borrower). The hop leg of a routed trade is left out unless legs=all.
Query Parameters
| Param | Type | Description |
|---|---|---|
| cursor | string | Opaque cursor from pagination.nextCursor |
| limit | number | Items per page (default: 20, max: 100) |
| type | string | buy, sell, leverage_buy, or leverage_sell |
| legRole | string | Only legs of this role (replaces the default, which leaves out route_hop): trade, route_hop, cross_leg, leverage_open, leverage_exit, loan_exit, liquidation, convert |
| legs | string | all: also return the hop leg of routed trades |
| main | string | Main token address or key: only legs on that main |
Response
{
"data": [
{
"id": 300,
"contractAddress": "0x...",
"type": "buy",
"amountToken": "1000000000000000000",
"amountUSDC": "5000000000000000000",
"amountQuote": "5000000000000000000",
"quoteAsset": "0x...",
"quoteDecimals": 18,
"user": "0x...",
"userArg": null,
"price": "5000000",
"main": "0x...",
"pairAsset": "0x...",
"pairDecimals": 6,
"pairSymbol": "USDG",
"valueUsdE18": "5000000000000000000",
"legValueUsdE18": "4970000000000000000",
"legRole": "trade",
"tradeLogIndex": 7,
"isPresale": false,
"userIsProtocol": false,
"txHash": "0x...",
"logIndex": 5,
"blockNumber": 12345678,
"timestamp": "2026-03-13T12:00:00.000Z"
}
],
"pagination": {
"limit": 20,
"hasMore": true,
"nextCursor": "12345678:5"
}
}amountToken is in 18-decimal token units. amountQuote (and the deprecated amountUSDC, same value) is the quote leg in quoteAsset units: the main's units (18 decimals) for a factory token, raw pair-asset units (pairDecimals) for a main. It is not a dollar amount; use valueUsdE18 (USD × 1e18, null when unknown). On a trade or cross_leg leg that is the trade's USD before fees, the same figure /api/v1/trades shows for that trade; on any other leg it is the leg's own value. legValueUsdE18 is always the leg's own value: what the pool saw (a buy after the swap fee, a sell before it). price is the contract's integer price in raw pair-asset units per whole token, a display hint: divide by 10^pairDecimals. A cross-pair swap appears as legs with legRole: "cross_leg" that share a tradeLogIndex; one row per user trade is at /api/v1/trades. nextCursor is blockNumber:logIndex; pass it back as ?cursor=.
// Get transaction history for a wallet
const res = await fetch(
"https://launchonbasis.com/api/v1/wallet/0xWalletAddress/transactions?limit=50",
{ headers: { "X-API-Key": "bsk_your_key" } }
);
const { data, pagination } = await res.json();