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.
Typescript (SDK) Node.js (Axios) Bash (cURL)
Copy const walletDetails = await rangoClient .getWalletsDetails ({
walletAddresses : [{
blockchain : "BSC" ,
address : "0xeb2629a2734e272bcc07bda959863f316f4bd4cf"
}]
})
Copy const response = await axios .get ( 'https://api.rango.exchange/wallets/details' , {
params : {
'address' : 'BSC.0xeb2629a2734e272bcc07bda959863f316f4bd4cf' ,
'apiKey' : 'c6381a79-2817-4602-83bf-6a641a409e32'
}
});
Copy curl --request GET \
--url 'https://api.rango.exchange/wallets/details?address=BSC.0xeb2629a2734e272bcc07bda959863f316f4bd4cf&apiKey=c6381a79-2817-4602-83bf-6a641a409e32'
API Definition SDK Models (Typescript)
walletAddresses
*
Description: List of user wallet addresses for desired blockchains.
Copy public async getWalletsDetails (
walletAddresses: WalletAddresses
): Promise < WalletDetailsResponse > ;
type WalletAddresses = { blockchain : string ; address : string }[]
API Definition SDK Models (Typescript) Sample Response
wallets
Description: List of wallets and their assets.
Copy 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
}
Copy {
"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
}
}
]
}
]
}