fungibletoken

Get User Balance

Retrieve the balance of a specified ERC-20 token for a given user address. It provides an essential function for wallet management and decentralized finance applications by offering real-time balance information across multiple blockchain networks.

💡 Compute Unit Value: 55 (Fixed)

get/defi/v1/fungibletoken/getuserbalance

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/fungibletoken/getuserbalance
  • Auth
    API key in header X-API-Key

Query parameters

chainId'1' | '56' | '43114' | '137' | '250' | '10' | '11155420' | '42161' | '421614' | '25' | '338' | '84532' | '8453' | '43113' | '97' | '80002' | '300' | '324' | '5000' | '5003'

The unique ID to direct queries or transactions to the correct blockchain. Find more here.

Example:1
tokenAddressstring required

The address of the token whose balance is to be retrieved.

Example:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
addressstring required

The public address of the user whose token balance is being queried.

Example:0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402
chainSymbolstring

The abbreviated chain name for queries or transactions.

Example:ETH
vsCurrenciesstring

A comma-separated list of currency symbols to convert the amount into, such as 'USD,EUR'. This parameter is optional and allows retrieving values in multiple fiat currencies.

Example:usd,eur,gbp

Response

Successful response

statusinteger
msgstring
dataobject

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "balance": "6174207572153394239393946019",
    "prices": {
      "usd": [
        {
          "0xfaba6f8e4a5e8ab82f62fe7c39859fa577269be3": "0.9886460715040926"
        }
      ],
      "inr": [
        {
          "0xfaba6f8e4a5e8ab82f62fe7c39859fa577269be3": "85.44778029217368"
        }
      ],
      "eur": [
        {
          "0xfaba6f8e4a5e8ab82f62fe7c39859fa577269be3": "0.8416413211939346"
        }
      ]
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.