Token Balance

Returns user balance of token for the specified chain

v2/balances/token-balance

How this endpoint is to be used :

  • This endpoint is used to return token balance of a user

  • The "Max" button on the Bungee App also requires this API to allow the user to easily input max token balance for bridging.

Returns the token balances of an address

GET https://api.socket.tech/v2/balances/token-balance

Path Parameters

NameTypeDescription

userAddress*

string

Address of token holder

tokenAddress*

string

Token address on specified network

chainId*

string

chainId of network

{
  "success" : true,
  "result" : [
  {
    "chainId": 0,
    "address": "string",
    "name": "string",
    "symbol": "string",
    "decimals": 0,
    "amount": 0,
    "icon": "string"
  }
  ]
}

Description of response parameters

ParameterDescription

success

Indicates successful response from endpoint, as intended.

chainId

ID of chain, for example xDAI = 100

tokenAddress

Contract address of token

userAddress

Address of user

name

Name of token

symbol

Symbol of token

decimals

Decimal places for amount supported by token

balance

Balance of token in user's wallet

icon

Icon URL of the token

TEST QUERY :

https://api.socket.tech/v2/swagger/#/Balances/BalancesController_getBalance

Last updated