post https://api-sdk.lmnl.dev/api/wallet/address-balance
This API is a request to retrieve native coin or token balance of a specific address or for a paginated list of addresses in your deposit wallet.
This API doesn't retrieve a list of address balances. To retrieve balance of an entire wallet, use the Retrieve a wallet balance API.
For Stellar, Cosmos, and Ripple chains, which only have a single address per wallet, use the Retrieve a wallet balance API instead.
API use cases
You can use the API to retrieve balance of either native coins or tokens from a single or list of addresses, as explained in the following use cases.
Retrieve native coin balance
- Single address query - You can retrieve native coin balance for a single address, using the following request body.
{
"wallet":{
"coin": "eth",
"walletId":1
},
"getAddressBalanceOption":{
"address":"0xec69e15335c1f7a0a4733b504abc327f81baf8b5"
}
}
- Paginated address query - You can retrieve native coin balance for a paginated list of addresses, using the following request body.
{
"wallet":{
"coin": "eth",
"walletId":1
},
"getAddressBalanceOption":{
"pagination":{
"pageNumber":1,
"pageSize":50
}
}
}
Retrieve token balance
- Single address query - You can retrieve token balance for a single address, using the following request body. The body includes an additional parameter
isTokenBalance
. If you set its value totrue
, the API retrieves the token balance.
{
"wallet":{
"coin": "eth",
"walletId":1
},
"getAddressBalanceOption":{
"address":"0x4014c023192ef37a91adcea4ac2fdd90914bd76f",
"isTokenBalance":true
}
}
- Paginated address query - You can retrieve token balance for a paginated list of addresses, using the following request body. The body includes an additional parameter
isTokenBalance
. If you set its value totrue
, the API retrieves the token balance.
{
"wallet":{
"coin": "eth",
"walletId":1
},
"getAddressBalanceOption":{
"pagination":{
"pageNumber":1,
"pageSize":10
},
"isTokenBalance":true
}
}