Query 24-hour protocol portfolios curve by chain name and user address

Description

  • Method:HTTPS GET

  • Encoding: UTF-8

  • Path: https://api.blockin.ai/v2/user/protocol_curve_24h

  • Description: Query user 24h protocol portfolios curve on a single chain

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, only support single chain's name (abbr or full name). eg: eth,Ethereum. Enumeration

address

Y

String

User's address

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

timestamp

Long

Y

Timestamp(seconds) on the curve .

usd_value

BigDecimal

Y

The price of all protocol portfolios in a user's account at the timestamp and on the single chain.

Request Sample

curl --request GET \ --url 'https://api.blockin.ai/v2/user/protocol_curve_24h?chain_name=Ethereum&address=0x28a55c4b4f9615fde3cdaddf6cc01fcf2e38a6b0' \ --header 'AccessKey: 1bdb01c947c54919b64d1fc6794atest'

Successful Response Sample

{
    "success": true,
    "data": [
        {
            "timestamp": 1695606900,
            "usd_value": 1550056.08
        },
        {
            "timestamp": 1695607200,
            "usd_value": 1552661.324
        },
        {
            "timestamp": 1695607500,
            "usd_value": 1550643.107
        }
        //...    
    ],
    "error_code": null,
    "error_msg": null
}

Last updated