cURL
curl --request POST \ --url https://api.tokenlayer.network/functions/v1/get-user-portfolio \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "chains": [ "base", "solana", "ethereum" ] } '
{ "success": true, "data": { "tokens": [ { "tokenId": "<string>", "name": "<string>", "symbol": "<string>", "slug": "<string>", "totalBalanceUsd": 123, "chainBalances": [ { "chain": "<string>", "chainSlug": "<string>", "balance": "<string>", "balanceFormatted": "<string>", "walletAddress": "<string>", "tokenAddress": "<string>", "decimals": 123, "eid": 123, "createdAt": "<string>", "priceUsd": 123, "valueUsd": 123 } ], "availableChains": [ "<string>" ], "logo": "<string>", "tokenLayerId": "<string>", "firstAcquired": "<string>" } ], "totalValueUsd": 123, "totalTokensCount": 123 } }
Retrieves the authenticated user’s complete token portfolio including:
Balances are grouped by token and include both raw balance (in wei) and formatted balance.
JWT token or API key
Filter portfolio to only include tokens on specified chains
["base", "solana", "ethereum"]
Successful response
true
Show child attributes