Blockin.ai OpenAPI
  • Welcome
  • 🥳GETTING STARTED
    • 🗝️Creating an Account
    • 👀Product Overview
  • 😈REFERENCE
    • 🐙API Reference
      • Chain
        • Query available chain list
      • Protocol
        • Query available protocol
        • Query available protocol list
        • Query all available protocol list
        • Query available tagInfo list
        • Query available protocol detail
        • Query available protocol detail list
        • Query all available protocol detail list
        • Query liquidity change list by chain name and pool address
        • Query swap list by chain name and pool address
      • User
        • Query used chain by user address
        • Query chain balance by chain name and user address
        • Query protocol portfolio list by chain name and user address
        • Query protocol portfolios on all chains by user address
        • Query protocol portfolio by chain name, protocol name and user address
        • Query protocol portfolios on all chains by protocol name and user address
        • Query protocol top holders by chain name and protocol name
        • Query simple protocol list by chain name and user address
        • Query simple protocol list on all chains by user address
        • Query token list by chain name and user address
        • Query token list on all chains by user address
        • Query token top holders by chain name and token address
        • Query collections by chain name and user address
        • Query collections on all chains by user address
        • Query collections on Bitcoin by user address
        • Query items by chain name, collection address and user address
        • Query inscriptions on Bitcoin by user address
        • Query items transfer list by chain name and user address
        • Query history list by chain name and user address
        • Query all history list by user address
        • Query User history - Advanced edition
        • Query total balance on all supported chains by user address
        • Query token authorized list by chain name and user address
        • Query nft authorized list by chain name and user address
        • Query 24-hour net assets curve by chain name and user address
        • Query 24-hour net assets curve on all supported chains by user address
        • Query 24-hour protocol portfolios curve by chain name and user address
        • Query 24-hour protocol portfolios curve on all supported chains by user address
        • Query 24-hour wallet curve by chain name and user address
        • Query 24-hour wallet curve on all supported chains by user address
      • Token
        • Query token info
        • Query token info list
        • Query token market info list
        • Subscribe to token kline data
        • Unsubscribe token kline
        • Query pool list by chain name and token address
        • Query liquidity change list by chain name and token address
        • Query swap list by chain name and token address
        • Query real-time exchange rate
        • Query real-time token price
        • Query LP_token info
        • Query symbol's price from foreign exchange
      • NFT
        • Query collection metadata by chain name and collection address
        • Query collection trade list by chain name and collection address
        • Query item info list by chain name and collection address
        • Query item metadata by chain name, collection address and item id
        • Refresh collection metadata
        • Query inscriptions metadata on Bitcoin by inscriptions id
      • Mirror
        • Query historical token list
        • Query historical protocol portfolios
        • Query historical assets
        • Query historical token list on all supported chains
        • Query historical protocol portfolios on all supported chains
        • Query historical assets on all supported chains
        • Query historical LP_token info
      • Subscription
        • Create history subscription
        • Update history subscription
        • Delete history subscription
        • History subscription query
        • Socket Subscription Connection
        • Subscription notify
        • Alter history subscription
        • History subscription- Query Batch_no List
        • Create history subscription V2
        • Delete history subscription V2
        • Query history subscription wallet V2
        • Query history subscription detail V2
        • History subscription Message query V2
        • Socket Subscription Connection V2
    • 📜Enumeration
    • 🎭Error Code
      • Pre exec error code
    • 🍪Related Features
      • Usage
    • ⌨️Change Log
    • 😎Terms of Service
Powered by GitBook
On this page
  • Description
  • Request Header
  • Request Parameters
  • Response
  • Public Response
  • Response Content
  • Response Content (Tron)
  • Request Sample
  • Successful Response Sample
  • EVM Chain Response Sample
  • Bitcoin Response Sample
  • Tron Response Sample
  • Failed Response Sample
  1. REFERENCE
  2. API Reference
  3. User

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

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

{
    "success": true,
    "data": [
        {
            "token_address": "0x33c6005ae9c0355a595583081120c18818eaecd4",
            "chain_name": "BSC",
            "chain_logo_url": "https://www.blockin.ai/image/chain/56.png",
            "name": "MetaPlay",
            "symbol": "MPLAY",
            "decimals": 18,
            "logo_url": "https://www.blockin.ai/image/bsc/token/0x33c6005ae9c0355a595583081120c18818eaecd4.png",
            "price": null,
            "amount": 2
        },
        {
            "token_address": "0x55d398326f99059ff775485246999027b3197955",
            "chain_name": "BSC",
            "chain_logo_url": "https://www.blockin.ai/image/chain/56.png",
            "name": "Tether USD",
            "symbol": "USDT",
            "decimals": 18,
            "logo_url": "https://www.blockin.ai/image/bsc/token/0x55d398326f99059ff775485246999027b3197955.png",
            "price": null,
            "amount": 74.71
        },
        {
            "token_address": "MATIC",
            "chain_name": "Polygon",
            "chain_logo_url": "https://www.blockin.ai/image/chain/137.png",
            "name": "MATIC",
            "symbol": "MATIC",
            "decimals": 18,
            "logo_url": "https://www.blockin.ai/image/polygon/token/MATIC.png",
            "price": null,
            "amount": 0.011
        }
    ],
    "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"
}
PreviousQuery token list by chain name and user addressNextQuery token top holders by chain name and token address

Last updated 1 year ago

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

😈
🐙
Enumeration