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 Wallets Details API
  • Wallets Details Request
  • Wallets Details Response

Was this helpful?

  1. API Integration
  2. Main API - Multi Step
  3. API Reference

Get Address Token Balance

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

PreviousGet Custom TokenNextTutorial

Last updated 8 months ago

Was this helpful?

Get Wallets Details API

Use this method if you want to get all tokens of a list of wallet addresses for some desired blockchains. Note that this endpoint is slow since it queries for all tokens an address is holding and balance of each one. We recommend to call the RPC directly or use single token balance method whenever possible.

const walletDetails = await rangoClient.getWalletsDetails({
    walletAddresses: [{
        blockchain: "BSC", 
        address: "0xeb2629a2734e272bcc07bda959863f316f4bd4cf"
    }]
})
const response = await axios.get('https://api.rango.exchange/wallets/details', {
  params: {
    'address': 'BSC.0xeb2629a2734e272bcc07bda959863f316f4bd4cf',
    'apiKey': 'c6381a79-2817-4602-83bf-6a641a409e32'
  }
});
curl --request GET \
     --url 'https://api.rango.exchange/wallets/details?address=BSC.0xeb2629a2734e272bcc07bda959863f316f4bd4cf&apiKey=c6381a79-2817-4602-83bf-6a641a409e32' 

Wallets Details Request

  • walletAddresses *

    • Description: List of user wallet addresses for desired blockchains.

public async getWalletsDetails(
    walletAddresses: WalletAddresses
): Promise<WalletDetailsResponse>;

type WalletAddresses = { blockchain: string; address: string }[]

Wallets Details Response

  • wallets

    • Description: List of wallets and their assets.

export type WalletDetailsResponse = {
  wallets: WalletDetail[]
}

export type WalletDetail = {
  failed: boolean
  blockChain: string
  address: string
  balances: AssetAndAmount[] | null
  explorerUrl: string
}

export type AssetAndAmount = {
  amount: Amount
  asset: Asset
}

export type Amount = {
  amount: string
  decimals: number
}

export type Asset = {
  blockchain: string
  address: string | null
  symbol: string
}
{
  "wallets": [
    {
      "blockChain": "BSC",
      "address": "0xeb2629a2734e272bcc07bda959863f316f4bd4cf",
      "failed": false,
      "explorerUrl": "https://bscscan.com/address/0xeb2629a2734e272bcc07bda959863f316f4bd4cf",
      "balances": [
        {
          "asset": {
            "blockchain": "BSC",
            "symbol": "BNB",
            "address": null
          },
          "amount": {
            "amount": "7127850000000000",
            "decimals": 9
          }
        },
        {
          "asset": {
            "blockchain": "BSC",
            "symbol": "XYZ",
            "address": "0x43fdec959a53092722d79ebd2bc0521719adc681"
          },
          "amount": {
            "amount": "21000000000",
            "decimals": 6
          }
        }
      ]
    }
  ]
}
🦎
⚙️
Get Balancerango-exchange
Logo