/v1/account/token-stats/{account}/{md5}
Per-token trading stats for account
Request
https://api.xrpl.to/v1/account/token-stats/rJqiMb94hyz41SBTNr2AyPNW8AzELa8nE/0dd550278b74cb6690fdae351e8e0df3| Path parameter | Value | Description |
|---|---|---|
| account | An XRPL account, its r-address | |
| md5 | The token's md5 (md5 of issuer_currency) |
curl 'https://api.xrpl.to/v1/account/token-stats/rJqiMb94hyz41SBTNr2AyPNW8AzELa8nE/0dd550278b74cb6690fdae351e8e0df3'
Response
https://api.xrpl.to/v1/account/token-stats/rJqiMb94hyz41SBTNr2AyPNW8AzELa8nE/0dd550278b74cb6690fdae351e8e0df3{ "success": true, "account": "rJqiMb94hyz41SBTNr2AyPNW8AzELa8nE", "md5": "0dd550278b74cb6690fdae351e8e0df3", "balance": 0, "avgBuyPrice": 0, "totalBought": 0, "totalSold": 0, "totalSpentXRP": 0, "totalReceivedXRP": 0, "realizedPnl": 0, "unrealizedPnl": 0, "totalPnl": 0, "holdingValue": 0, "avgBuyMcap": 0, "currentMcap": 0, "totalRoi": 0, "firstTradeTime": null, "tradeCount": 0, "exit": null, "took": 2 }
{ success, account, md5, balance, avgBuyPrice, totalBought, totalSold, totalSpentXRP, totalReceivedXRP, realizedPnl, unrealizedPnl, totalPnl, holdingValue, avgBuyMcap, currentMcap, totalRoi, firstTradeTime, tradeCount, exit, took }
What it does
Per-token trading stats for account
- Notes
- holdingValue/unrealizedPnl mark the bag at the pool SPOT price. `exit` is what selling the WHOLE balance returns right now through the swap engine (same fill as POST /dex/quote): { xrp (proceeds), impactPct (execution vs spot, negative), poolChangePct (pool spot after the fill, null off-AMM), pnl (P&L at that price, same basis as totalPnl — never above it), split (true when one transaction cannot fill it) }. null when the holding is dust, the pair has no liquidity, or the engine cannot price it. Refreshed every 10 s.