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

{
    "success": true,
    "data": [
        {
            "token_address": "ETH",
            "chain_name": "Ethereum",
            "chain_logo_url": "https://www.blockin.ai/image/chain/1.png",
            "name": "ETH",
            "symbol": "ETH",
            "decimals": 18,
            "logo_url": "https://www.blockin.ai/image/token/ETH.png",
            "price": 1652.27,
            "amount": 1.014976637669929475
        },
        {
            "token_address": "0xba50933c268f567bdc86e1ac131be072c6b0b71a",
            "chain_name": "Ethereum",
            "chain_logo_url": "https://www.blockin.ai/image/chain/1.png",
            "name": "ARPA",
            "symbol": "ARPA",
            "decimals": 18,
            "logo_url": "https://www.blockin.ai/image/token/0xba50933c268f567bdc86e1ac131be072c6b0b71a.png",
            "price": 0.04672359,
            "amount": 0.000020000000000000
        },
        {
            "token_address": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
            "chain_name": "Ethereum",
            "chain_logo_url": "https://www.blockin.ai/image/chain/1.png",
            "name": "Lido Staked Ether",
            "symbol": "STETH",
            "decimals": 18,
            "logo_url": "https://www.blockin.ai/image/token/0xae7ab96520de3a18e5e111b5eaab095312d7fe84.png",
            "price": 1654.76,
            "amount": 0.000000000000000001
        },
        {
            "token_address": "0xa8b61cff52564758a204f841e636265bebc8db9b",
            "chain_name": "Ethereum",
            "chain_logo_url": "https://www.blockin.ai/image/chain/1.png",
            "name": "Yield Protocol",
            "symbol": "YIELD",
            "decimals": 18,
            "logo_url": "https://www.blockin.ai/image/token/0xa8b61cff52564758a204f841e636265bebc8db9b.png",
            "price": 0.00334606,
            "amount": 49.716527154806079308
        },
        {
            "token_address": "0xe530441f4f73bdb6dc2fa5af7c3fc5fd551ec838",
            "chain_name": "Ethereum",
            "chain_logo_url": "https://www.blockin.ai/image/chain/1.png",
            "name": "GSENetwork",
            "symbol": "GSE",
            "decimals": 4,
            "logo_url": "https://www.blockin.ai/image/token/0xe530441f4f73bdb6dc2fa5af7c3fc5fd551ec838.png",
            "price": 0.00002647,
            "amount": 10
        },
        {
            "token_address": "0xcbfef8fdd706cde6f208460f2bf39aa9c785f05d",
            "chain_name": "Ethereum",
            "chain_logo_url": "https://www.blockin.ai/image/chain/1.png",
            "name": "Kine Protocol",
            "symbol": "KINE",
            "decimals": 18,
            "logo_url": "https://www.blockin.ai/image/token/0xcbfef8fdd706cde6f208460f2bf39aa9c785f05d.png",
            "price": 0.107056,
            "amount": 0.000082185611604019
        },
        {
            "token_address": "0x1982b2f5814301d4e9a8b0201555376e62f82428",
            "chain_name": "Ethereum",
            "chain_logo_url": "https://www.blockin.ai/image/chain/1.png",
            "name": "Aave Interest Bearing STETH",
            "symbol": "ASTETH",
            "decimals": 18,
            "logo_url": "https://www.blockin.ai/image/token/0x1982b2f5814301d4e9a8b0201555376e62f82428.png",
            "price": 1654.76,
            "amount": 0.022009208160817339
        },
        {
            "token_address": "0x94d863173ee77439e4292284ff13fad54b3ba182",
            "chain_name": "Ethereum",
            "chain_logo_url": "https://www.blockin.ai/image/chain/1.png",
            "name": "Delphi",
            "symbol": "ADEL",
            "decimals": 18,
            "logo_url": "https://www.blockin.ai/image/token/0x94d863173ee77439e4292284ff13fad54b3ba182.png",
            "price": 0.0041594,
            "amount": 270.802309306671567719
        },
        {
            "token_address": "0x809826cceab68c387726af962713b64cb5cb3cca",
            "chain_name": "Ethereum",
            "chain_logo_url": "https://www.blockin.ai/image/chain/1.png",
            "name": "Nucleus Vision",
            "symbol": "NCASH",
            "decimals": 18,
            "logo_url": "https://www.blockin.ai/image/token/0x809826cceab68c387726af962713b64cb5cb3cca.png",
            "price": 0.00004926,
            "amount": 200.000000000000000000
        }
    ],
    "error_code": null,
    "error_msg": null
}

Bitcoin Response Sample

{
    "success": true,
    "data": [
        {
            "chain_name": "Bitcoin",
            "chain_logo_url": "https://www.blockin.ai/image/chain/bitcoin.png",
            "name": "SATS",
            "logo_url": "https://www.blockin.ai/image/bitcoin/token/sats.png",
            "price": 0.00000002748150662950,
            "available_balance": 100000000.000000000000000000,
            "transferable_balance": 0,
            "last_event": 3784616,
            "script_hash": "a9145484dba870b88d924051d4ad1d1eb23e9210614887"
        },
        {
            "chain_name": "Bitcoin",
            "chain_logo_url": "https://www.blockin.ai/image/chain/bitcoin.png",
            "name": "ORDI",
            "logo_url": "https://www.blockin.ai/image/bitcoin/token/ordi.png",
            "price": 9.23644126789450000000,
            "available_balance": 100.000000000000000000,
            "transferable_balance": 0,
            "last_event": 6815078,
            "script_hash": "a9145484dba870b88d924051d4ad1d1eb23e9210614887"
        },
        {
            "chain_name": "Bitcoin",
            "chain_logo_url": "https://www.blockin.ai/image/chain/bitcoin.png",
            "name": "BYLD",
            "logo_url": "https://www.blockin.ai/image/bitcoin/token/byld.png",
            "price": null,
            "available_balance": 12000.000000000000000000,
            "transferable_balance": 0,
            "last_event": 8201554,
            "script_hash": "a9145484dba870b88d924051d4ad1d1eb23e9210614887"
        },
        {
            "chain_name": "Bitcoin",
            "chain_logo_url": "https://www.blockin.ai/image/chain/bitcoin.png",
            "name": "\uD835\uDD4F",
            "logo_url": "https://www.blockin.ai/image/bitcoin/token/\uD835\uDD4F.png",
            "price": null,
            "available_balance": 10000.000000000000000000,
            "transferable_balance": 0,
            "last_event": 25854959,
            "script_hash": "a9145484dba870b88d924051d4ad1d1eb23e9210614887"
        }
    ],
    "error_code": null,
    "error_msg": null
}

Tron Response Sample

{
    "success": true,
    "data": [
        {
            "chain_name": "Tron",
            "chain_logo_url": "https://www.blockin.ai/image/chain/tron.png",
            "name": "TRX",
            "logo_url": "https://www.blockin.ai/image/tron/token/TRX.png",
            "price": 0.105745985301831594,
            "token_address": "TRX",
            "symbol": "TRX",
            "decimals": 6,
            "amount": 2026712010.636548,
            "chain_scan_token": "https://tronscan.org//#/token/0",
            "chain_scan_image": "https://www.blockin.ai/image/scan/tron.png",
            "token_id": null,
            "type": null,
            "available_amount": 443930944.636548
        },
        {
            "chain_name": "Tron",
            "chain_logo_url": "https://www.blockin.ai/image/chain/tron.png",
            "name": "hashguess.com",
            "logo_url": "https://www.blockin.ai/image/tron/token/1004980.png",
            "price": null,
            "token_address": "",
            "symbol": "hashguess.com",
            "decimals": 6,
            "amount": 8.888888,
            "chain_scan_token": "https://tronscan.org//#/token/1004980/transfers",
            "chain_scan_image": "https://www.blockin.ai/image/scan/tron.png",
            "token_id": 1004980,
            "type": "trc10",
            "available_amount": null
        },
        {
            "chain_name": "Tron",
            "chain_logo_url": "https://www.blockin.ai/image/chain/tron.png",
            "name": "Wrapped TRX",
            "logo_url": "https://www.blockin.ai/image/tron/token/TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR.png",
            "price": 0.105745985301831594,
            "token_address": "TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR",
            "symbol": "WTRX",
            "decimals": 6,
            "amount": 367232696.361677,
            "chain_scan_token": "https://tronscan.org//#/token20/TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR",
            "chain_scan_image": "https://www.blockin.ai/image/scan/tron.png",
            "token_id": null,
            "type": "trc20",
            "available_amount": null
        }
    ],
    "error_code": null,
    "error_msg": null
}

Failed Response Sample

{
    "success": false,
    "data": null,
    "error_code": "CHAIN_NOT_SUPPORT",
    "error_msg": "The current chain is not supported temporarily"
}

Last updated