This API retrieves the wallet balance from the user's deposit address.

Quick Navigation: Function Index

  1. Retrieving the Balance of a Native Coin Address
    1. Single Address Query
    2. Paginated Query
  2. Retrieving the Balance of a Token Address
    1. Single Address Query
    2. Paginated Query

Retrieving the Balance of a Native Coin Address

  1. Single Address Query - This method returns the balance of a specific address.
  2. Paginated Query - This method returns the balances of a range of addresses, provided by index.

1. Single Address Query

curl --location --request POST 'https://api-sdk.lmnl.dev/api/wallet/address-balance' \
--header 'Authorization: Basic d2hETzR3bmhYaEdLVXp4Ulo2R2dJcVJYT2RXTzU4ODc6eGRuV2MxNjY0cGhKSjZXMWpudXdHalRxWm53MWZna3RUNUpqd2E0UFlMTkluLVlTRjl6OEJiTTByeDN1NTg4Nw==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "wallet":{
        "coin": "eth",
        "walletId":1
    },
    "getAddressBalanceOption":{
        "address":"0xec69e15335c1f7a0a4733b504abc327f81baf8b5"
    }
}'

Request Body

{
    "wallet":{
        "coin": "eth",
        "walletId":1
    },
    "getAddressBalanceOption":{
        "address":"0xec69e15335c1f7a0a4733b504abc327f81baf8b5"
    }
}

Response Body

{
   "address":"0x2e73f21c7ea4ef53bc17a5c06e0cf1a168b85464",
   "type":"receive",
   "path":"m/0/0",
   "balance":"0.49982859",
   "walletid":3412
}

2. Paginated Query

curl --location --request POST 'https://api-sdk.lmnl.dev/api/wallet/address-balance' \
--header 'Authorization: Basic d2hETzR3bmhYaEdLVXp4Ulo2R2dJcVJYT2RXTzU4ODc6eGRuV2MxNjY0cGhKSjZXMWpudXdHalRxWm53MWZna3RUNUpqd2E0UFlMTkluLVlTRjl6OEJiTTByeDN1NTg4Nw==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "wallet":{
        "coin": "eth",
        "walletId":1
    },
    "getAddressBalanceOption":{
       "pagination":{
                    "pageNumber":1,
                    "pageSize":50
                }
    }
}'

Request Body

{
    "wallet":{
        "coin": "eth",
        "walletId":1
    },
    "getAddressBalanceOption":{
       "pagination":{
                    "pageNumber":1,
                    "pageSize":50
                }
    }
}

Response Body

[
   {
      "address":"0x2e73f21c7ea4ef53bc17a5c06e0cf1a168b85464",
      "type":"receive",
      "path":"m/0/0",
      "balance":"0.49982859",
      "walletid":3412
   }
]

Retrieving the Balance of a Token Address:

This method includes an additional parameter, isTokenBalance. When set to true, it retrieves the balance of a Token. Here's how to get the balance of a Token address:

  1. Single Address Query - Retrieves the balance of a specific Token address.
  2. Paginated Query - Retrieves the balances of a range of Token addresses, provided by index.

1. Single Address Query

cURL Request

curl --location --request POST 'https://api-sdk.lmnl.dev/api/wallet/address-balance' \
--header 'Authorization: Basic d2hETzR3bmhYaEdLVXp4Ulo2R2dJcVJYT2RXTzU4ODc6eGRuV2MxNjY0cGhKSjZXMWpudXdHalRxWm53MWZna3RUNUpqd2E0UFlMTkluLVlTRjl6OEJiTTByeDN1NTg4Nw==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "wallet":{
        "coin": "eth",
        "walletId":1
    },
    "getAddressBalanceOption":{
        "address":"0x4014c023192ef37a91adcea4ac2fdd90914bd76f",
        "isTokenBalance":true
    }
}'

Request Body

{
    "wallet":{
        "coin": "eth",
        "walletId":1
    },
    "getAddressBalanceOption":{
        "address":"0x4014c023192ef37a91adcea4ac2fdd90914bd76f",
        "isTokenBalance":true
    }
}

Response Body

{
   "address":"0x2e73f21c7ea4ef53bc17a5c06e0cf1a168b85464",
   "type":"receive",
   "path":"m/0/0",
   "balance":"0.49982859",
   "walletid":3412,
   "tokens":[
      {
         "address":"0x2e73F21c7EA4EF53Bc17a5C06e0cF1A168B85464",
         "token_identifier":"0xdc31Ee1784292379Fbb2964b3B9C4124D8F89C60",
         "balance":"50.00000000",
         "balance_usd":"50.00000000",
         "wallet_id":3412,
         "decimal_places":18,
         "symbol":"DAI"
      }
   ]
}

2. Paginated Query

cURL Request

curl --location --request POST 'https://api-sdk.lmnl.dev/api/wallet/address-balance' \
--header 'Authorization: Basic d2hETzR3bmhYaEdLVXp4Ulo2R2dJcVJYT2RXTzU4ODc6eGRuV2MxNjY0cGhKSjZXMWpudXdHalRxWm53MWZna3RUNUpqd2E0UFlMTkluLVlTRjl6OEJiTTByeDN1NTg4Nw==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "wallet":{
        "coin": "eth",
        "walletId":1
    },
    "getAddressBalanceOption":{
        "pagination":{
                    "pageNumber":1,
                    "pageSize":10
                },
        "isTokenBalance":true
    }
}'

Request Body

{
    "wallet":{
        "coin": "eth",
        "walletId":1
    },
    "getAddressBalanceOption":{
        "pagination":{
                    "pageNumber":1,
                    "pageSize":10
                },
        "isTokenBalance":true
    }
}

Response Body

[
   {
      "address":"0x2e73f21c7ea4ef53bc17a5c06e0cf1a168b85464",
      "type":"receive",
      "path":"m/0/0",
      "balance":"0.49971123",
      "walletid":3412,
      "tokens":[
         {
            "address":"0x2e73F21c7EA4EF53Bc17a5C06e0cF1A168B85464",
            "token_identifier":"0xdc31Ee1784292379Fbb2964b3B9C4124D8F89C60",
            "balance":"49.99980000",
            "balance_usd":"49.99980000",
            "wallet_id":3412,
            "decimal_places":18,
            "symbol":"DAI"
         }
      ]
   }
]
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!