# Get Address Token Balance

## 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.

{% tabs %}
{% tab title="Typescript (SDK)" %}

```typescript
const walletDetails = await rangoClient.getWalletsDetails({
    walletAddresses: [{
        blockchain: "BSC", 
        address: "0xeb2629a2734e272bcc07bda959863f316f4bd4cf"
    }]
})
```

{% endtab %}

{% tab title="Node.js (Axios)" %}

```typescript
const response = await axios.get('https://api.rango.exchange/wallets/details', {
  params: {
    'address': 'BSC.0xeb2629a2734e272bcc07bda959863f316f4bd4cf',
    'apiKey': 'c6381a79-2817-4602-83bf-6a641a409e32'
  }
});
```

{% endtab %}

{% tab title="Bash (cURL)" %}

```bash
curl --request GET \
     --url 'https://api.rango.exchange/wallets/details?address=BSC.0xeb2629a2734e272bcc07bda959863f316f4bd4cf&apiKey=c6381a79-2817-4602-83bf-6a641a409e32' 
```

{% endtab %}
{% endtabs %}

{% embed url="<https://rango-api.readme.io/reference/getwalletdetails>" %}

### Wallets Details Request&#x20;

{% tabs %}
{% tab title="API Definition" %}

* **`walletAddresses`** <mark style="color:red;">\*</mark>&#x20;
  * Description: List of user wallet addresses for desired blockchains.
    {% endtab %}

{% tab title="SDK Models (Typescript)" %}

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

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

{% endtab %}
{% endtabs %}

### Wallets Details Response&#x20;

{% tabs %}
{% tab title="API Definition" %}

* **`wallets`**
  * Description: List of wallets and their assets.
    {% endtab %}

{% tab title="SDK Models (Typescript)" %}

```typescript
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
}

```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
  "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
          }
        }
      ]
    }
  ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rango.exchange/api-integration/main-api-multi-step/api-reference/get-address-token-balance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
