/v1/history
Trade history by token, account, or both
Request
https://api.xrpl.to/v1/history?md5=0dd550278b74cb6690fdae351e8e0df3&limit=5| Query parameter | Value | Description |
|---|---|---|
| md5 | token id (optional if account provided) | |
| account | r-address | |
| limit | int (max 1000) | |
| offset | int | |
| start_time | unix ms | |
| end_time | unix ms | |
| type | trades|liquidity|all (default: trades) | |
| liquidity_type | create|deposit|withdraw | |
| pair_type | xrp|token | |
| xrp_only | bool | |
| xrp_amount | float (min XRP threshold) | |
| cursor | int | |
| direction | asc|desc (default: desc) |
curl 'https://api.xrpl.to/v1/history?md5=0dd550278b74cb6690fdae351e8e0df3&limit=5'
Response
https://api.xrpl.to/v1/history?md5=0dd550278b74cb6690fdae351e8e0df3&limit=5{ "success": true, "took": 1, "data": [ { "_id": "108479791_3_5DFFECD9", "maker": "rHW8GSv6qxsdu1cBqnzErLefVfbvSSSB5J", "taker": "rpK3DLr8vDhPDGEPRKSjb65gdgehDga4ZZ", "seq": 108394376, "pair": "4f192df9c8fb094ec93d87aa446fa161", "paid": { "currency": "524C555344000000000000000000000000000000", "issuer": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De", "value": 197.6947494320662 }, "got": { "currency": "XRP", "issuer": "XRPL", "value": 211.774887 }, "ledger": 108479791, "hash": "163D775F73DE7C77C49AE4ED2F11B0A184A0DF56CFE683DBC247260A5DFFECD9", "time": 1795282370000, "isAMM": false, "_hasDex": true, "_mergedXrp": 211.774887, "_mergedTok": 197.6947494320662, "fillSource": "DEX", "price": 1.0712216060789828, "marketcap": 823294958.6545588 }, { "_id": "108479791_1_215E6A8F", "maker": "rL5GetGSnvorYFgM8c8G35b7mD8xcndjNk", "taker": "rjEGAxKsHDCsQ986wUMuasAJnLZWjcBuk", "seq": 93512421, "pair": "4f192df9c8fb094ec93d87aa446fa161", "paid": { "currency": "524C555344000000000000000000000000000000", "issuer": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De", "value": 303.6591886405 }, "got": { "currency": "XRP", "issuer": "XRPL", "value": 325.291043 }, "ledger": 108479791, "hash": "D8C25C1093A987B576D4B0DBA21EC1255E61873440197F77199B2447215E6A8F", "time": 1795282370000, "isAMM": false, "fillSource": "DEX", "price": 1.071237279057311, "marketcap": 823307004.2331501 } ], "meta": { "total": 21501823, "offset": 0, "limit": 5, "direction": "desc", "nextCursor": 1795282370000, "hasMore": true, "timeRange": { "startTime": null, "endTime": null } } }
{ success, took, data[], meta: { total, offset, limit, direction, nextCursor, hasMore, truncated?, timeRange } }
What it does
Trade history by token, account, or both
- Notes
- Cursor pagination: pass meta.nextCursor as cursor; it is null on the last page (meta.hasMore false). One row per Payment and pair (its fills merged), so meta.total counts fills; a page ends on a whole ledger and can hold a few rows more or fewer than limit. Offset pagination capped at 100k rows (meta.truncated: true, total capped to servable window; use cursor for deeper history). Trades carry sourceTag (numeric, on-chain SourceTag) and/or platform (canonical name for memo-identified platforms, e.g. SPYDEX)