Query historical LP_token info
Description
Method:HTTPS POST
Encoding: UTF-8
Description: Query LP's token historical info through token address on the chain and protocol supported by Blockin. Mirror time can be described as either block number or timestamp.
Request Header
Content-Type
Y
String
application/json
AccessKey
Y
String
1bdb01c947c54919b64d1fc6794atest
Request Parameters
mirror_time
N
Long
Historical timestamp you want to query. Mirror time needs to be accurate to the second.(Either block number or mirror time is required)
block_number
N
Long
Historical block number you want to query.(Either block number or mirror time is required)
chain_name
Y
String
Chain's name, only support single chain's name (abbr or full name). eg: eth,Ethereum. Enumeration
address
Y
String
LP's Token address
Response
Public Response
success
Y
Boolean
Success Boolean
data
N
Object
Response object
error_code
N
String
Error code
error_msg
N
String
Error message
Response Content
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.
Request Sample
curl --request POST --url https://www.blockin.ai/v2/mirror/user/token_list --header 'AccessKey: 1bdb01c947c54919b64d1fc6794atest' --header 'content-type: application/json' --data '{ "chain_name": "eth", "mirror_time": 1671966177, "block_number": null, "address": "0xdfc14d2af169b0d36c4eff567ada9b2e0cae044f" }'
Successful Response Sample
{
"success": true,
"data": {
"mirror_time": 1671966177,
"chain_block": {
"Ethereum": 16261335
},
"lp_token": {
"chain_name": "Ethereum",
"address": "0xdfc14d2af169b0d36c4eff567ada9b2e0cae044f",
"protocol_name": "uniswap2",
"pool_address": "0xdfc14d2af169b0d36c4eff567ada9b2e0cae044f",
"total_value": 127215.18,
"create_timestamp": 1601606980000,
"underlying_infos": [
{
"chain_name": "Ethereum",
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"price": 1208.936663671303929717,
"percentage": 0.4973
},
{
"chain_name": "Ethereum",
"address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
"price": 55.023201589701238121,
"percentage": 0.5027
}
]
}
},
"error_code": null,
"error_msg": null
}
Last updated