DeFi API
Query user's position list

Query user's position list#

Description: This API provides the user's asset position list.

Request URL#

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

Request parameter#

Parameter nameDescriptionParameter typeRequiredData type
walletAddressListuser wallet address listRequest bodyYesArray
>chainIdpublic chain IDRequest bodyYesString
>walletAddressuser wallet addressRequest bodyYesString

Response parameters#

Parameter nameDescriptionData type
walletIdPlatformListpositions from address listArray
>platformListpositions from a specific addressString
>platformNameplatform nameString
>analysisPlatformIdprotocol IDString
>platformLogoplatform logoString
>currencyAmountposition value in USDString
>isSupportInvestif supported by Okx DeFiString
>platformUrlplatform UrlString
>networkBalanceVoListpositions from multiple networkArray
>>networknetwork nameString
>>networkLogonetwork logoString
>>chainIdpulich chain IDString
>>currencyAmountposition value in USDString
>investmentCountnumber of positionsString

Request example#

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"
        }
    ]
}'

Response example#

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
    }
}