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.

const walletDetails = await rangoClient.balance({
    blockchain: "BSC", 
    address: "0xeb2629a2734e272bcc07bda959863f316f4bd4cf"
})

Balance Request

ParamDescription

WalletAddress {blockchain, address} *

User wallet addresses for the desired blockchain.

Balance Response

FieldDescription

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.

Last updated