Links

Balance API

Get details of a list of wallets, including their explorer Url & balance

Get Full Balance

Note that this endpoint is slow since it queries for all tokens an address is holding and balance of each one. We recommend to use single token balance endpoint whenever possible.
Typescript
cURL
const walletDetails = await rangoClient.balance({
blockchain: "BSC",
address: "0xeb2629a2734e272bcc07bda959863f316f4bd4cf"
})
curl --request GET \
--url 'https://api.rango.exchange/basic/balance?blockchain=BSC&address=0xeb2629a2734e272bcc07bda959863f316f4bd4cf&apiKey=c6381a79-2817-4602-83bf-6a641a409e32' \
--header 'accept: */*'
Balance
rango-exchange
Balance Swagger

Balance Request

Param
Description
WalletAddress {blockchain, address} *
User wallet addresses for the desired blockchain.

Balance Response

Field
Description
wallets
List of wallet assets

Sample Response

Sample Response
{
"wallets": [
{
"blockChain": "BSC",
"address": "0xeb2629a2734e272bcc07bda959863f316f4bd4cf",
"failed": false,
"explorerUrl": "https://bscscan.com/address/0xeb2629a2734e272bcc07bda959863f316f4bd4cf",
"balances": [
{
"asset": {
"blockchain": "BSC",
"symbol": "BNB",
"address": null
},
"amount": {
"amount": "911814661733430075",
"decimals": 18
}
}
]
}
]
}

Get Single Token Balance

This endpoint returns balance of a single token for given address.
curl 'https://api.rango.exchange/basic/token-balance?apiKey=YOUR_API_KEY&walletAddress=0xeb2629a2734e272bcc07bda959863f316f4bd4cf&blockchain=FANTOM&symbol=USDC&address=0x04068da6c83afcfa0e13ba15a6696662335d5b75' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'x-rango-id: USER_RANDOM_UUID' \
--compressed
Returns a BigInteger value indicating balance of user for given token.