Get Holdings
note
Lite URL: https://lite-api.jup.ag/ultra/v1/holdings
Dynamic URL: https://api.jup.ag/ultra/v1/holdings
Dynamic Rate Limits are now applied to Ultra API.
- No Pro plans or payment needed.
- Simply generate the universal API Key via Portal
- Rate limits scale together with your swap volume.
API Reference
To fully utilize the Ultra API, check out the Ultra API Reference.
Get Holdings
The Ultra API supports a simple endpoint to get the detailed token holdings of an account, you just need to pass in the required parameter of the user's wallet address.
const holdingsResponse = await (
await fetch(`https://lite-api.jup.ag/ultra/v1/holdings/3X2LFoTQecbpqCR7G5tL1kczqBKurjKPHhKSZrJ4wgWc`)
).json();
console.log(JSON.stringify(holdingsResponse, null, 2));
Holdings Response
The holdings response will return the following:
- A list of token holdings for the user's wallet address.
- Token account information for each token holding.
- Note that the top level response outside of
tokens
is the native SOL balance.
tip
For tokens with more than thousands of token holdings, the response may be slow - depending on the number of token holdings, the response time may vary.
If you only need the native SOL balance, you can use /holdings/{address}/native
to get the native SOL balance.
Successful example response:
{
"amount": "1000000000",
"uiAmount": 1,
"uiAmountString": "1",
"tokens": {
"jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v": [
{
"account": "tokenaccountaddress",
"amount": "1000000000",
"uiAmount": 1,
"uiAmountString": "1",
"isFrozen": false,
"isAssociatedTokenAccount": true,
"decimals": 9,
"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
}
]
}
}
Failed example response:
{
"error": "Invalid address"
}