查询用户投资品维度的持仓列表#
描述:该 API 将提供用户投资品维度的资产持仓列表。
请求地址#
POST https://web3.okx.com/api/v5/defi/user/investment/asset-detail
请求参数#
| 参数名称 | 相关描述 | 参数类型 | 必传 | 数据类型 | 
|---|---|---|---|---|
| address | 用户钱包地址 | 请求体 | 是 | String | 
| chainId | 公链 ID | 请求体 | 否 | String | 
| investmentId | 投资品 ID (investmentId 和 poolId 不可同时为空),这里获取 | 请求体 | 是 | String | 
| poolId | BRC-20 类型投资品所需 ID (investmentId 和 poolId 不可同时为空) | 请求体 | 否 | String | 
| farmInvestmentId | 挖矿类型投资品 ID,用以检测是否可用于挖矿 (仅 Uni V3 类型投资品需此条件) | 请求体 | 否 | String | 
响应参数#
| 参数名称 | 相关描述 | 数据类型 | 
|---|---|---|
| investmentName | 投资品名称 | String | 
| investmentId | 投资品 ID | String | 
| sourceInvestmentId | 投资品来源 ID | String | 
| investType | 投资品类型 (1、存币;2、流动性池;3、挖矿;4、机枪池;5、质押) | String | 
| investName | 投资品类名称 (1、存币;2、流动性池;3、挖矿;4、机枪池;5、质押) | String | 
| assetsTokenList | 资产代币列表 | Array[Struct] | 
| >tokenSymbol | 币种标识 | String | 
| >tokenAddress | 币种合约地址 | String | 
| >tokenPrecision | 币种精度 | String | 
| >coinAmount | 币种数量 | String | 
| >currencyAmount | 币种数量美元价值 | String | 
| rewardDefiTokenInfo | 综合赎回列表 | Array[Struct] | 
| >baseDefiTokenInfos | 基础代币信息 | Array[Struct] | 
| >>tokenSymbol | 币种标识 | String | 
| >>tokenAddress | 币种合约地址 | String | 
| >>tokenPrecision | 币种精度 | String | 
| >>coinAmount | 币种数量 | String | 
| >>currencyAmount | 币种数量美元价值 | String | 
| >>network | 币种网络 | String | 
| >rewardType | 赎回类型:1、公共;2、可赎回、3、空投;4、奖励金 | String | 
| totalValue | 美元价值 | String | 
请求示例#
shell
curl --location 'https://web3.okx.com/api/v5/defi/user/investment/asset-detail' \
--header 'OK-ACCESS-KEY: 9c****77' \
--header 'OK-ACCESS-PASSPHRASE: p****d' \
--header 'Content-Type: application/json' \
--data '{
  "address":"0x7f****da",
  "investmentId":"15299",
  "chainId":"137"
}'
响应示例#
200
{
    "code": 0,
    "msg": "",
    "data": [
        {
            "investmentName": "Curve LP peUSD-USDC.e",
            "investmentId": "21670",
            "sourceInvestmentId": "21668",
            "investType": "3",
            "investName": "Farm",
            "assetsTokenList": [
                {
                    "tokenSymbol": "peUSDUSDC-f",
                    "tokenAddress": "0x1e2ebe2fffa7c9fa83486188f7c19f9acd1bb990",
                    "tokenPrecision": "18",
                    "coinAmount": "2.691174106339194701",
                    "currencyAmount": "2.61869989433167351725360102089837"
                }
            ],
            "rewardDefiTokenInfo": [
                {
                    "baseDefiTokenInfos": [
                        {
                            "tokenSymbol": "esLBR",
                            "tokenAddress": "0x73b1988a3336208e55275c52fac7f5d3a7dfb89f",
                            "network": "ARB",
                            "tokenPrecision": "18",
                            "coinAmount": "0.002555136460646101",
                            "currencyAmount": "0.00307009284288151737625793354325",
                            "buttonType": "0"
                        }
                    ],
                    "buttonType": "3",
                    "rewardType": "1"
                }
            ],
            "totalValue": "2.62176998717455503462985895444162"
        }
    ]
}
