Query token list by chain name and user address

Description

  • Method: HTTPS GET

  • Encoding: UTF-8

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

  • Description: Query token list by chain name and 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_name

Y

String

Chain's name,support single chain's name.eg:eth,Ethereum. 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 Request Sample

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

Bitcoin Request Sample

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

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