Search…
Balances

v1/balances

How this endpoint is to be used :
  • This endpoint is used to return token balances of a user to filter tokens owned by a user in the token list.
  • The "Max" button on the Bungee app also requires this API to allow the user to easily input max token balance for bridging.
get
https://api.socket.tech/v1
/balances
Returns the token balances of an address

Description of response parameters

Parameter
Description
success
Indicates successful response from endpoint, as intended.
chainId
ID of chain, for example xDAI = 100
address
Contract address of token
name
Name of token
symbol
Symbol of token
decimals
Decimal places for amount supported by token
price
Price of token
amount
Balance of token in user's wallet
currency
Currency of price, e.g USD
icon
Icon URL of the token

Example :

QUERY PARAMETERS

Parameter
Value
userAddress
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

REQUEST

RESPONSE

Response body
Response Headers
​
{
"success": true,
"result": [
{
"chainId": 1,
"address": "0x0027449bf0887ca3e431d263ffdefb244d95b555",
"name": "Not",
"symbol": "NOT",
"decimals": 18,
"price": 0,
"amount": 1.157920892373162e+59,
"currency": "USD"
},
... // Response is long, hence has been shortened
]
}
​
access-control-allow-origin: *
content-length: 41215
content-type: application/json; charset=utf-8
date: Mon,15 Nov 2021 16:46:17 GMT
etag: W/"a0ff-7eU/OOmdNySoJ7TBFmqkvTfDRUA"
x-powered-by: Express
Test your query on the Socket API interface :
Copy link
On this page
get
Returns the token balances of an address
Description of response parameters
Example :