This API enables users to retrieve their asset position list for a specific DeFi protocol, providing detailed insights into investments across various networks and protocols.
Request URL
POST https://web3.okx.com/api/v5/defi/user/asset/platform/detail
Request Parameters
Parameter Name | Description | Parameter Type | Required | Data Type |
---|---|---|---|---|
analysisPlatformId |
Protocol ID | Request Body | Yes | String |
walletAddressList |
User Address List | Request Body | Yes | Array |
> chainId |
Public Chain ID | Request Body | Yes | String |
> walletAddress |
User Wallet Address | Request Body | Yes | String |
Response Parameters
Parameter Name | Description | Data Type |
---|---|---|
networkHoldVoList |
User Positions Under a Specific Network | Array |
> network |
Network Name | String |
> chainId |
Public Chain ID | String |
> investTokenBalanceVoList |
Position List | Array |
>> investType |
Investment Type (1. Save, 2. Pool, 3. Farm, 4. Vaults, 5. Stake) | String |
>>> tokenSymbol |
Asset Name | String |
>>> tokenLogo |
Asset Logo URL | String |
>>> coinAmount |
Invested Asset Amount | String |
>>> currencyAmount |
Invested Amount in USD | String |
>>> tokenPrecision |
Token Precision | String |
>>> tokenAddress |
Token Address | String |
>>> network |
Network | String |
>> totalValue |
Total Position Value in USD | String |
> platformName |
Protocol Name | String |
> analysisPlatformId |
Protocol ID | String |
> platformLogo |
Protocol Logo URL | String |
> platformUrl |
Protocol URL | String |
👉 Explore DeFi API Documentation
Request Example
json
{
"analysisPlatformId": "aave",
"walletAddressList": [
{
"chainId": "1",
"walletAddress": "0x123...abc"
}
]
}
Response Example
json
{
"networkHoldVoList": [
{
"network": "Ethereum",
"chainId": "1",
"investTokenBalanceVoList": [
{
"investType": "2",
"tokenSymbol": "USDC",
"tokenLogo": "https://example.com/usdc.png",
"coinAmount": "1000.00",
"currencyAmount": "1000.00",
"tokenPrecision": "6",
"tokenAddress": "0xA0b...123",
"network": "Ethereum"
}
],
"totalValue": "1000.00",
"platformName": "Aave",
"analysisPlatformId": "aave",
"platformLogo": "https://example.com/aave.png",
"platformUrl": "https://aave.com"
}
]
}
Frequently Asked Questions
1. What investment types are supported?
The API categorizes investments into five types:
– Save (1)
– Pool (2)
– Farm (3)
– Vaults (4)
– Stake (5)
2. How do I specify multiple wallet addresses?
Include each address in the walletAddressList
array with its corresponding chainId
.
👉 Learn More About DeFi Integration
3. Can I filter positions by network?
Yes, the response includes network
and chainId
for each position, allowing network-specific filtering.
4. What does currencyAmount
represent?
It indicates the USD-equivalent value of the invested asset, useful for portfolio valuation.
5. How accurate is the token precision data?
The tokenPrecision
field ensures correct decimal handling, critical for calculations.
6. Is historical position data available?
This API retrieves real-time positions; historical tracking requires additional endpoints.
By integrating this API, developers can build powerful DeFi dashboards, track portfolio performance, and optimize investment strategies efficiently.