Get Wallet Positions with PnL
Retrieve all enriched token positions for a wallet on a specific blockchain, including detailed token metrics, liquidity, trade stats, profit/loss (PnL) data, and wallet metadata (funding info, labels).
Documentation Index
Fetch the complete documentation index at: https://docs.mobula.io/llms.txt
Use this file to discover all available pages before exploring further.
Query details
| Parameter | Type | Required | Description |
|---|---|---|---|
wallet | string | Yes | Single wallet address to query. |
blockchains | string | No | Comma-separated list of blockchain IDs (e.g., "ethereum,base,solana:solana"). If omitted, all chains. |
limit | number | No | Number of positions per page (1-500, default: 100). |
offset | number | No | Offset for pagination (default: 0). |
cursor | string | No | Cursor for cursor-based pagination (takes precedence over offset). |
cursorDirection | string | No | Cursor direction: before or after (default: after). |
sortBy | string | No | Sort field: lastActivity or realizedPnl (default: lastActivity). |
order | string | No | Sort order: asc or desc (default: desc). |
includeFees | boolean | No | Include fees in PnL calculation (deduct total_fees_paid_usd from PnL). Default: false. |
useSwapRecipient | boolean | No | Use swap recipient mode (query wallet_positions_recipients table). Default: false. |
includeAllBalances | boolean | No | Include all tokens the wallet holds, not just tokens with trading history. Default: false. |
onlyOpen | boolean | No | Return only positions the wallet still holds on-chain. Filters out closed positions both at SQL (using warehouse.balances_new) and after the live RPC balance check. Default: false. |
minPositionValueUSD | number | No | Drop positions worth less than this USD value. Applied after the live RPC balance and live pool price, so it works correctly for small-caps whose DB price is null. Default: no minimum. |
Step-by-Step Tutorial and Video Walkthrough
- Check out the guide: Here
Usage Examples
- Query Wallet Positions on Solana
- Query Wallet Positions on Ethereum with pagination
- Only open positions worth at least $1000 (smart filter for portfolio dashboards)
Query Response
New Response Fields
Position-level labels
Each position includes alabels array with token-specific trading labels:
bundler- Wallet used bundled transactionssniper- Wallet sniped early tradesinsider- Wallet had insider accessdev- Developer walletproTrader- Professional trader walletsmartTrader- Smart money walletfreshTrader- New trader wallet
Wallet Metadata
The response includes awallet object with wallet-level metadata:
Batch Positions (POST)
Fetch all positions for multiple wallets in a single request. Each wallet can have its own pagination, sorting, and chain filtering. Endpoint:POST /api/2/wallet/positions
Limit: Up to 10 wallets per batch request.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Yes | Array of wallet query objects (max 10). |
items[].wallet | string | Yes | Wallet address. |
items[].blockchains | string[] | No | Array of blockchain IDs (e.g., ["ethereum","base"]). If omitted, all chains. |
items[].limit | number | No | Number of positions per page (1-500, default: 100). |
items[].offset | number | No | Offset for pagination (default: 0). |
items[].sortBy | string | No | Sort field: lastActivity or realizedPnl (default: lastActivity). |
items[].order | string | No | Sort order: asc or desc (default: desc). |
items[].useSwapRecipient | boolean | No | Use swap recipient mode. Default: false. |
items[].includeAllBalances | boolean | No | Include all tokens the wallet holds. Default: false. |
items[].onlyOpen | boolean | No | Return only positions still held on-chain. Default: false. |
items[].minPositionValueUSD | number | No | Drop positions worth less than this USD value. Default: no minimum. |
Example Request
Example Response
SDK Usage
Query Parameters
Wallet address
Comma-separated list of chain IDs (e.g., "evm:1,evm:8453,solana:solana"). If omitted, all chains.
Number of positions per page (1-500, default: 100)
1 <= x <= 500Offset for pagination (default: 0)
x >= 0Cursor for cursor-based pagination (takes precedence over offset)
Cursor direction (default: after)
before, after Sort field (default: lastActivity)
lastActivity, realizedPnl Sort order (default: desc)
asc, desc Include fees in PnL calculation (deduct total_fees_paid_usd from PnL)
Use swap recipient mode (query wallet_positions_recipients table instead of wallet_positions)
Include all tokens the wallet holds, not just tokens with trading history
Return only positions still held on-chain (filters out fully closed positions)
Drop positions worth less than this USD value (live RPC balance × live pool price)
x >= 0