Query token list on all chains by user address

Description

  • Method: HTTPS GET

  • Encoding: UTF-8

  • Path: https://api.blockin.ai/v2/user/all_token_list

  • Description: Query token list on all chains by user address

Request Header

Parameter
Required
Type
Description

Content-Type

Y

String

application/json

AccessKey

Y

String

1bdb01c947c54919b64d1fc6794atest

Request Parameters

Parameter
Required
Type
Description

chain_names

N

String

If chain_names is empty, query all. Multiple chains are separated by commas. eg: eth, bsc, arb, btc. Enumeration

address

Y

String

User's address

is_all

N

Boolean

if true , return all the token info (including lp tokens) . if false, only return token info (excluding lp tokens) . Default is false

Response

Public Response

Parameter
Required
Type
Description

success

Y

Boolean

Success Boolean

data

N

List

Response object

error_code

N

String

Error code

error_msg

N

String

Error message

Response Content

Parameter
Required
Type
Description

token_address

Y

String

Token's address

chain_name

Y

String

Chain's name

name

Y

String

Token's name

symbol

Y

String

Token's symbol

decimals

Y

Integer

Token's decimals

logo_url

Y

String

URL of the token's logo image

chain_logo_url

Y

String

URL of the chain's logo image

price

Y

BigDecimal

Token's price

amount

Y

BigDecimal

Token's amount

Response Content (Tron)

Parameter
Required
Type
Description

token_id

N

Long

trc10's tokenId

type

Y

String

trc10/trc20

available_amount

N

BigDecimal

platformToken's available Amount

Request Sample

EVM Chain Request Sample

curl -H "Content-Type:application/json" -H "AccessKey:1bdb01c947c54919b64d1fc6794atest" -X GET "https://api.blockin.ai/v2/user/all_token_list?chain_names=pol,bsc&address=0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0"

Bitcoin Request Sample

curl -H "Content-Type:application/json" -H "AccessKey:1bdb01c947c54919b64d1fc6794atest" -X GET "https://www.blockin.ai/v2/user/all_token_list?address=39Puqo7cu5vowLsgPayaXVLDigUjPmQNnW&chain_names="

Tron Request Sample

curl -H "Content-Type:application/json" -H "AccessKey:1bdb01c947c54919b64d1fc6794atest" -X GET "https://api.blockin.ai/v2/user/token_list?address=TPyjyZfsYaXStgz2NmAraF1uZcMtkgNan5&chain_name=Tron"

Successful Response Sample

EVM Chain Response Sample

Bitcoin Response Sample

Tron Response Sample

Failed Response Sample

Last updated