Query simple protocol list by chain name and user address

Description

  • Method: HTTPS GET

  • Encoding: UTF-8

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

  • Description: Query simple protocol list by chain name and 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_name

Y

String

Chain's name,support single chain's 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

protocol_name

Y

String

Protocol's name

chain_name

Y

String

Chain's name

project_name

Y

String

Project's name

logo_url

Y

String

URL of the protocol's logo image.

site_url

Y

String

Website URL

net_usd_value

Y

BigDecimal

Amount of the user's net assets in the protocol.

asset_usd_value

Y

BigDecimal

Amount of the user's total assets in the protocol.

debt_usd_value

Y

BigDecimal

Debt USD value.

Request Sample

curl -H "Content-Type:application/json" -H "AccessKey:1bdb01c947c54919b64d1fc6794atest" -X GET "https://api.blockin.ai/v2/user/simple_protocol_list?address=0x1c3cb7e3920c77eba162cf044f418a854c12ffef&chain_name=eth"

Successful Response Sample

{
    "success": true,
    "data": [
        {
            "protocol_name": "lido",
            "chain_name": "Ethereum",
            "project_name": "LIDO",
            "logo_url": "https://www.blockin.ai/image/protocol/lido.png",
            "site_url": "https://stake.lido.fi",
            "net_usd_value": 0.00000393278602006233,
            "asset_usd_value": 0.00000393278602006233,
            "debt_usd_value": 0
        },
        {
            "protocol_name": "snowswap",
            "chain_name": "Ethereum",
            "project_name": "SnowSwap",
            "logo_url": "https://www.blockin.ai/image/protocol/snowswap.png",
            "site_url": "https://snowswap.org",
            "net_usd_value": 551614.24120078157577403559634146066929563177,
            "asset_usd_value": 551614.24120078157577403559634146066929563177,
            "debt_usd_value": 0
        },
        {
            "protocol_name": "curve",
            "chain_name": "Ethereum",
            "project_name": "Curve",
            "logo_url": "https://www.blockin.ai/image/protocol/curve.png",
            "site_url": "https://curve.fi/",
            "net_usd_value": 551614.24120078157577403559634146066929563177,
            "asset_usd_value": 551614.24120078157577403559634146066929563177,
            "debt_usd_value": 0
        }
    ],
    "error_code": null,
    "error_msg": null
}

Last updated