Query historical assets on all supported chains

Description

  • Method:HTTPS POST

  • Encoding: UTF-8

  • Path: https://api.blockin.ai/v2/mirror/user/all_assets

  • Description: Query historical assets(including token list and protocol portfolios) on multiple chains by user address and mirror time(Block number is unsupported because of multiple chains). You can also specify chain names.

Request Header

Parameter
Required
Type
Description

Content-Type

Y

String

application/json

AccessKey

Y

String

1bdb01c947c54919b64d1fc6794atest

Request Parameters

Parameter
Required
Type
Description

mirror_time

Y

Long

Historical timestamp you want to query. Mirror time needs to be accurate to the second.

chain_names

N

List

It's array structure. If chain_names are missing or empty, it queries all supported chains. To query multiple chains, use a string array. eg: ['eth', 'bsc', 'arb']. Enumeration

address

Y

String

User's address

Response

Public Response

Parameter
Required
Type
Description

success

Y

Boolean

Success Boolean

data

N

Object

Response object

error_code

N

String

Error code

error_msg

N

String

Error message

Response Content

Parameter
Required
Type
Description

mirror_time

Long

Y

Historical timestamp(seconds) that you want to query.

chain_block

Map

N

The block height of the querying chains in response data.

tokens

List

Y

Token list data. Like this token_list

protocols

List

Y

Protocol portfolios data. Like this protocol_list

Request Sample

curl --request POST --url https://www.blockin.ai/v2/mirror/user/all_assets --header 'AccessKey: 1bdb01c947c54919b64d1fc6794atest' --header 'content-type: application/json' --data '{ "mirror_time":1688019180, "address":"0x4d0e439ba905eb39aee88097433add619cf5257b", "chain_names":["eth","arb"] }'

Successful Response Sample

{
    "success": true,
    "data": {
         "mirror_time": 1688019180,
         "chain_block": {
			"BSC": 30518804,
			"Ethereum": 17831711
		},         
        "tokens":[...],
        "protocols":[...]
    },
    "error_code": null,
    "error_msg": null
}

Last updated