Rango Docs
API SwaggerWidget PlaygroundAppWebsite
  • 👋Welcome to Rango
  • 🏠Introduction
  • 💁How It Works
  • ✅Integrations
  • ⚖️Rango vs. Competitors
  • 🔐Security
  • 🛣️Roadmap
  • 🦎Tokenomics
  • 💰Airdrop
  • ❓FAQ
  • 🐞Bug Bounty
  • API Integration
    • 🔡Terminology
    • 🚄API Key & Rate Limits
    • 🤝Choosing the Right API
    • 🦄Basic API - Single Step
      • 🛝API Flow
      • ⚙️API Reference
        • Get Blockchains & Tokens
        • Get Quote
        • Create Transaction (Swap)
        • Check Transaction Status
        • Check Approve Transaction Status
        • Get Address Assets & Balances
        • Get Token Balance
        • Report Transaction Failure
        • Get Direct Tokens
        • Get Custom Token
        • Message Passing
      • 🎓Tutorial
        • 🍰SDK Example
      • 💰Monetization
      • 🎹Sample Transactions
      • ✅Integration Checklist
    • 🦎Main API - Multi Step
      • 🛝API Flow
      • ⚙️API Reference
        • Get Blockchains & Tokens
        • Get Best Route
        • Get All Possible Routes
        • Confirm Route
        • Create Transaction
        • Check Transaction Status
        • Check Approve Transaction Status
        • Report Transaction Failure
        • Get Custom Token
        • Get Address Token Balance
      • 🎓Tutorial
        • 🍰SDK Example
      • 💰Monetization
      • 🎹Sample Transactions
  • ℹ️API Troubleshooting
  • Technical Docs
    • 🍔Swap Aggregation
    • 💰Monetization
    • ⛽Fee Structure
    • ⛽Network Fees and Gas Estimates
    • ⌛Stuck Transactions
  • Widget Integration
    • 🧩Overview
    • 🎇Quick Start
    • ⚙️Customization
    • 💰Monetization
    • 🛣️React Router
    • 🎵Events
    • 💳External Wallets
  • Smart Contracts
    • 👩‍💼Architecture
    • 🔎Audit Reports
    • 🏗️Deployment Addresses
    • 📩Message Passing
  • Ask for Integration
    • 🙋‍♂️DEXs & DEX Aggregators
    • 📱Rango Mobile SDK
  • Useful Links
    • Twitter
    • Discord Server
    • TG Announcements
    • TG Group
  • Terms of Use
  • Privacy policy
Powered by GitBook
On this page
  • Get Token Balance API
  • Token Balance Request
  • Token Balance Response

Was this helpful?

  1. API Integration
  2. Basic API - Single Step
  3. API Reference

Get Token Balance

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

PreviousGet Address Assets & BalancesNextReport Transaction Failure

Last updated 7 months ago

Was this helpful?

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* String

    • Description: The blockchain which this token belongs to.

    • Example: BSC

  • symbol* String

    • Description: The token symbol.

    • Example: BNB

  • address String

    • Description: Smart contract address of token, null for native tokens.

    • Example: null

  • walletAddress* String

    • Description: User wallet address for the desired blockchain.

export type TokenBalanceRequest = {
  blockchain: string
  symbol: string
  address: string | null
  walletAddress: string
}

Token Balance Response

  • balance

    • Description: balance amount

    • Example: 46077752529840023

  • error

    • Description: Error message if there was any problem

  • errorCode

    • Description: Error code if there was any problem

  • traceId

    • Description: 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
}
🦄
⚙️
Token Balancerango-exchange
Token Balance Swagger
Logo