Multichain Balances

The fetchMultiChainBalances function in our SDK provides a utility for retrieving the token balances of an EOA wallet across various blockchain networks. This functionality is crucial for users managing diverse portfolios that span multiple chains, ensuring a comprehensive overview of their assets in a consolidated manner.

Expected parameters

fetchMultiChainBalances accepts the following parameters:

ParameterTypeDescription

eoaAddress

string

The address whose balances are required to be fetched

extendedBalances

boolean

Default is false. If true, it will fetch balances of additional chains

ParameterTypeDescription

eoaAddress

string

The address whose balances are required to be fetched.

extendedBalances

boolean

Default is false.

Function Call

let balances = await aarcSDK.fetchMultiChainBalances(
  eoaAddress: string,
  extendedBalances: true
);

Response

The response from the fetchMultiChainBalances will be:

{
    "1": {
        "balances": [
            {
                "decimals": number,
                "name": string,
                "symbol": string,
                "token_address": string
                "logo": string,
                "native_token": boolean,
                "type": string,
                "is_spam": boolean,
                "balance": string,
                "usd_price": boolean
            }
        ],
        "logo": string
    },
    "56": {
        "balances": [
            {
                "decimals": number,
                "name": string,
                "symbol": string,
                "token_address": string
                "logo": string,
                "native_token": boolean,
                "type": string,
                "is_spam": boolean,
                "balance": string,
                "usd_price": boolean
            }
        ],
        "logo": string
    }
}

Support

If you face any trouble, feel free to reach out to our engineers in the Telegram support group.

Last updated