Query real-time token price

Description

  • Method: HTTPS POST

  • Encoding: UTF-8

  • Path: https://api.blockin.ai/v2/quot/token/price

  • Description: Query real-time token price

Request Header

Parameter
Required
Type
Description

Content-Type

Y

String

application/json

AccessKey

Y

String

1bdb01c947c54919b64d1fc6794atest

Request Parameters

Parameter
Required
Type
Description

address_list

Y

List

address_list that need to be queried

address_list content

Parameter
Required
Type
Description

address

Y

String

Token address

chain_name

N

String

Chain's name, eg:eth/Ethereum,arb/Arbitrum (Default: Ethereum)

Response

Public Response

Parameter
Required
Type
Description

success

Y

Boolean

Success Boolean

data

Y

List

Response object

error_code

N

String

Error code

error_msg

N

String

Error message

Data Content

Parameter
Required
Type
Description

address

Y

String

Token address

chain_name

Y

String

Chain's name, eg:eth/Ethereum,arb/Arbitrum (Default: Ethereum)

decimal

Y

Integer

Token price's decimal

price

Y

BigDecimal

Token price

symbol

Y

String

Symbol abbr

update_at

Y

Long

Update time

timestamp

Y

Long

Timestamp

Request Sample

curl -H "Content-Type:application/json" -H "AccessKey:1bdb01c947c54919b64d1fc6794atest" "https://api.blockin.ai/v2/quot/token/price" --data ' { "address_list":[{ "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "chain_name":"Ethereum" }], "user_no":"80230512587" }'

Successful Response Sample

{
    "success": true,
    "data": {
        "address_list": [
            {
                "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                "chain_name": "Ethereum",
                "decimal": 18,
                "price": 1828.050618946103191889,
                "symbol": "WETH",
                "update_at": 1692172439
            }
        ],
        "timestamp": 1692238208
    },
    "error_code": null,
    "error_msg": null
}

Last updated