Get Token Balance
Get details of a list of wallet addresses, including their explorer Url & balance
Get Token Balance API
This endpoint returns the balance of a specific token for the provided address.
const balance = await rango.tokenBalance({
walletAddress: "0x9F8cCdaFCc39F3c7D6EBf637c9151673CBc36b88",
blockchain: "BSC",
symbol: "BNB",
address: null,
})const response = await axios.get('https://api.rango.exchange/basic/token-balance', {
params: {
'walletAddress': '0x9F8cCdaFCc39F3c7D6EBf637c9151673CBc36b88',
'blockchain': 'BSC',
'symbol': 'BNB',
'address': null,
'apiKey': 'c6381a79-2817-4602-83bf-6a641a409e32'
}
});curl --request GET \
--url 'https://api.rango.exchange/basic/token-balance?walletAddress=0x9F8cCdaFCc39F3c7D6EBf637c9151673CBc36b88&blockchain=BSC&symbol=BNB&apiKey=c6381a79-2817-4602-83bf-6a641a409e32'Token Balance Request
blockchain* StringDescription: The blockchain which this token belongs to.
Example:
BSC
symbol* StringDescription: The token symbol.
Example:
BNB
addressStringDescription: Smart contract address of token, null for native tokens.
Example:
null
walletAddress* StringDescription: User wallet address for the desired blockchain.
export type TokenBalanceRequest = {
blockchain: string
symbol: string
address: string | null
walletAddress: string
}Token Balance Response
balanceDescription: balance amount
Example:
46077752529840023
errorDescription: Error message if there was any problem
errorCodeDescription: Error code if there was any problem
traceIdDescription: Trace id help Rango support to resolve the issue
export type TokenBalanceResponse = {
balance: string | null
error: string | null
errorCode: number | null
traceId: number | null
}{
"balance": "46077752529840023",
"error": null,
"errorCode": null,
"traceId": null
}Last updated
Was this helpful?