🪙Balances

Balances of either native, wrapped or erc20 tokens. An API that does it all.

Get Balance by Network

Fetches the native balance for an address for a specific network. Please not that using the network to filter is optional, but advised.

GET https://api.decentri.fi/{address}/native-balance?network={network}

Path Parameters

NameTypeDescription

address*

String

Address of the account

Query Parameters

NameTypeDescription

network*

String

network

{
  "amount": 5.564687931831088,
  "network": {
    "name": "POLYGON",
    "logo": "https://github.com/defitrack/data/raw/master/logo/network/polygon.png",
    "chainId": 137
  },
  "token": {
    "address": "0x0",
    "name": "MATIC",
    "decimals": 18,
    "symbol": "MATIC",
    "logo": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/polygon/info/logo.png",
    "type": "NATIVE",
    "totalSupply": 0
  },
  "dollarValue": 3.1209469908293266,
  "price": 0.56084852
}

Get Token Balances

Fetches the token balances for an address for a specific network. Please not that using the network to filter is optional, but advised, as it fetches balances for thousands of tokens.

GET https://api.decentri.fi/balance/{address}/token-balances

Path Parameters

NameTypeDescription

address*

String

Query Parameters

NameTypeDescription

network

String

network

[
  {
    "amount": 10.862976703547655,
    "network": {
      "name": "OPTIMISM",
      "logo": "https://github.com/defitrack/data/raw/master/logo/network/optimism.png",
      "chainId": 10
    },
    "token": {
      "address": "0x4200000000000000000000000000000000000042",
      "name": "Optimism",
      "decimals": 18,
      "symbol": "OP",
      "logo": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/optimism/assets/0x4200000000000000000000000000000000000042/logo.png",
      "type": "SINGLE",
      "totalSupply": 4294967295999999999998990000
    },
    "dollarValue": 14.466156098686495,
    "price": 1.331693558171961
  },
  {
    "amount": 47.336913334274065,
    "network": {
      "name": "OPTIMISM",
      "logo": "https://github.com/defitrack/data/raw/master/logo/network/optimism.png",
      "chainId": 10
    },
    "token": {
      "address": "0x9560e827af36c94d2ac33a39bce1fe78631088db",
      "name": "VelodromeV2",
      "decimals": 18,
      "symbol": "VELO",
      "logo": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/optimism/assets/0x9560e827aF36c94D2Ac33a39bCE1Fe78631088Db/logo.png",
      "type": "SINGLE",
      "totalSupply": 1087349082336311154022319640
    },
    "dollarValue": 3.711065488308792,
    "price": 0.07839686255212194
  },
  {
    "amount": 2.516780004935962,
    "network": {
      "name": "OPTIMISM",
      "logo": "https://github.com/defitrack/data/raw/master/logo/network/optimism.png",
      "chainId": 10
    },
    "token": {
      "address": "0x1f32b1c2345538c0c6f582fcb022739c4a194ebb",
      "name": "Wrapped liquid staked Ether 2.0",
      "decimals": 18,
      "symbol": "wstETH",
      "logo": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/optimism/assets/0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb/logo.png",
      "type": "SINGLE",
      "totalSupply": 45409969073454282675352
    },
    "dollarValue": 4591.826704301722,
    "price": 1824.4847365666187
  }
]

Last updated