DeFi API

查询用户全网持仓列表#

描述:该 API 将提供用户全网的资产持仓列表。

请求地址#

POST https://www.okx.com/api/v5/defi/user/asset/platform/list

请求参数#

参数名称相关描述参数类型必传数据类型
walletAddressList用户钱包地址列表请求体Array
>chainId公链 ID请求体String
>walletAddress用户钱包地址请求体String

响应参数#

参数名称相关描述数据类型
walletIdPlatformList地址集对应的仓位列表Array
>platformList一个地址的持仓列表String
>platformName平台名称String
>analysisPlatformId协议IDString
>platformLogo平台图标String
>currencyAmount美元持仓金额String
>isSupportInvestOkx DeFi是否支持String
>platformUrl平台链接String
>networkBalanceVoList不同网络下的持仓列表Array
>>network网络名称String
>>networkLogo网络图标String
>>chainId链IDString
>>currencyAmount美元持仓金额String
>investmentCount在投投资品数量String

请求示例#

shell
curl --location 'https://www.okx.com/api/v5/defi/user/asset/platform/list' \
--header 'OK-ACCESS-KEY: 9c****77' \
--header 'OK-ACCESS-PASSPHRASE: p****d' \
--header 'Content-Type: application/json' \
--data '{
  "walletAddressList": [
        {
            "chainId": 1,
            "walletAddress": "0x655b35f11006617696a4b31978ba4c078b6b7145"
        }
    ]
}'

响应示例#

200
{
    "code": 0,
    "msg": "",
    "error_code": "0",
    "error_message": "",
    "detailMsg": "",
    "data": {
        "walletIdPlatformList": [
            {
                "platformList": [
                    {
                        "platformName": "Ethena",
                        "analysisPlatformId": 118265,
                        "platformLogo": "https://static.coinall.ltd/cdn/web3/protocol/logo/1702889213278.png/type=png_350_0",
                        "platformColor": "",
                        "currencyAmount": "10076.999426431322729394061370751783986",
                        "isSupportInvest": true,
                        "bonusTag": 0,
                        "platformUrl": "https://app.ethena.fi",
                        "networkBalanceVoList": [
                            {
                                "network": "ETH",
                                "networkLogo": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
                                "chainId": 1,
                                "currencyAmount": "10076.999426431322729394061370751783986"
                            }
                        ],
                        "investmentCount": 1
                    },
                    {
                        "platformName": "Pendle V2",
                        "analysisPlatformId": 258,
                        "platformLogo": "https://static.coinall.ltd/cdn/web3/protocol/logo/pendle-v2.png/type=png_350_0",
                        "platformColor": "",
                        "currencyAmount": "161.9345234089089141378517476223121560",
                        "isSupportInvest": true,
                        "bonusTag": 0,
                        "platformUrl": "https://www.pendle.finance/",
                        "networkBalanceVoList": [
                            {
                                "network": "ETH",
                                "networkLogo": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
                                "chainId": 1,
                                "currencyAmount": "161.9345234089089141378517476223121560"
                            }
                        ],
                        "investmentCount": 2
                    },
                    {
                        "platformName": "Zircuit",
                        "analysisPlatformId": 119424,
                        "platformLogo": "https://static.coinall.ltd/cdn/web3/protocol/logo/zircuit.png/type=png_350_0",
                        "platformColor": "",
                        "currencyAmount": "156.9108954533033331829362703655488",
                        "isSupportInvest": true,
                        "bonusTag": 0,
                        "platformUrl": "https://stake.zircuit.com/",
                        "networkBalanceVoList": [
                            {
                                "network": "ETH",
                                "networkLogo": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
                                "chainId": 1,
                                "currencyAmount": "156.9108954533033331829362703655488"
                            }
                        ],
                        "investmentCount": 1
                    }
                ],
                "walletId": "8f4d93d7-275e-45dd-a0ce-2014d82d4baf",
                "totalAssets": "10395.8448452935349767148493887396449420"
            }
        ],
        "lpTokenAddressList": [
            {
                "chainId": 1,
                "tokenAddress": "0xdc02b77a3986da62c7a78fed73949c9767850809"
            }
        ],
        "updateAt": 1727083602000,
        "assetStatus": 1
    }
}