用户持仓明细#
当用户要查看在某个具体 DeFi 协议的详细持仓时,调用此接口。需传入钱包地址列表和目标协议信息(analysisPlatformId 从上一步的协议列表接口获取)。返回结果包含每个投资品的详细资产信息、V3 仓位信息、可领取奖励等。根据返回的 investmentId 和仓位信息,可进一步调用交易执行 API 进行赎回或领取奖励。
URL:POST /api/v6/defi/user/asset/platform/detail
请求参数#
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| walletAddressList | Array | 是 | 钱包列表 |
| > chainIndex | String | 是 | 链ID |
| > walletAddress | String | 是 | 钱包地址 |
| > pubKey | String | 否 | 公钥(仅针对BTC投资品时使用) |
| platformList | Array | 是 | 指定需要查询的 DeFi 协议 |
| > chainIndex | String | 否 | 链ID |
| > analysisPlatformId | String | 否 | 协议ID |
请求示例#
示例 1: 按协议 ID 查询#
Json
{
"walletAddressList": [
{
"chainIndex": "1",
"walletAddress": "0x7f429edeff8afc7bb3a2cf7db832fc86f6fa99da"
}
],
"platformList": [
{
"chainIndex": "1",
"analysisPlatformId": "44"
}
]
}
响应参数#
| 字段 | 类型 | 说明 |
|---|---|---|
| walletIdPlatformDetailList | Array | 钱包维度持仓 |
| > networkHoldVoList | Array | 网络维度持仓 |
| > > network | String | 网络名称 |
| > > chainIndex | String | 链ID |
| > > isSupportInvest | Boolean | 是否支持投资 |
| > > totalAssert | String | 总资产(USD) |
| > > investTokenBalanceVoList | Array | 投资品维度持仓 |
| > > > investmentName | String | 投资品名称 |
| > > > validatorName | String | 验证者名称 |
| > > > currentPrice | String | 当前价格(例: 1 DAI - 1.0393 USDC) |
| > > > investmentId | String | 投资品 ID |
| > > > specialPositionAssetKey | String | 特殊持仓资产键 |
| > > > sourceInvestmentId | String | 源投资品 ID |
| > > > feeRate | String | 费率(Uni V3 使用,例: 0.0003) |
| > > > aggregateProductId | String | 聚合产品 ID |
| > > > isInvestTypeSupport | Boolean | 投资类型是否支持 |
| > > > investType | Integer | 投资类型(1:save、2:pool、3:farm、4:vaults、5:stake、6:borrow、7:staking、8:locked、9:deposit、10:vesting) |
| > > > investName | String | 投资类型描述 |
| > > > investLogo | Object | 投资品 Logo 信息 |
| > > > positionList | Array | 仓位详情列表 |
| > > > > range | String | 价格区间(例: 0.892 - 0.992 USDC per DAI) |
| > > > > reverseRange | String | 反向价格区间 |
| > > > > rangeInfo | Object | 价格区间详细信息 |
| > > > > tokenId | String | NFT 的 tokenId(例: 93828) |
| > > > > positionName | String | 仓位名称 |
| > > > > nftLogo | String | NFT Logo |
| > > > > positionStatus | String | 仓位状态(ACTIVE, INACTIVE) |
| > > > > assetsTokenList | Array | 资产代币列表 |
| > > > > showIncreaseLiquidity | boolean | 是否显示增加流动性 |
| > > > > rewardDefiTokenInfo | Array | 复合奖励(结构同 availableRewards 元素) |
| > > > > unclaimFeesDefiTokenInfo | Array | Uni V3 费用(结构同 availableRewards 元素) |
| > > > > totalValue | String | 总价值(USD) |
| > > > > isNarrow | Boolean | 区间是否过窄 |
| > > > > needInvest | Boolean | 是否需要投资(true: 需要投资, false: 已投资) |
| > > > > settlementTime | String | 结算时间(秒级时间戳) |
| > > > > assetPositionType | String | 仓位类型(0: uni v3 仓位, 1: 有到期时间的仓位) |
| > > > > positionExtInfoList | Array | 仓位扩展信息列表 |
| > > > assetsTokenList | Array | 资产代币列表 |
| > > > borrowTokenList | Array | 借款代币列表(LSDFI) |
| > > > rewardDefiTokenInfo | Array | 复合奖励(结构同 availableRewards 元素) |
| > > > fundsInfo | Array | 资金信息(结构同 availableRewards 元素) |
| > > > extraData | Object | 详情页扩展数据 |
| > > > totalValue | String | 总价值(USD) |
| > > > overflowTotalValue | String | 溢出总价值(USD) |
| > > > collateralRatioInfo | Object | 抵押率信息(LSDFI) |
| > > > rewardAddress | String | BTC 奖励接收地址 |
| > > > maturityTime | String | Pendle 到期时间 |
| > > > fixedApy | String | Pendle 固定 APY |
| > > > browserUrl | String | OKLink 浏览器 URL |
| > > > poolId | String | 池子 ID |
| > > > poolAddress | String | 池子地址 |
| > > > tagList | Array | 标签列表 |
| > > > investNameTagList | Array | 投资名称标签列表 |
| > > > extraFieldList | Array | 显示额外字段列表 |
| > > > subTitle | String | 副标题(例: ID: 205c8e01aa#12) |
| > > > investmentCategory | Integer | 投资品分类(0: Earn, 1: Brc20, 2: LSDFI) |
| > > > investmentClassify | String | 投资品分类 |
| > > > nonPoolPositionList | Array | 非 UniV3 投资品仓位列表 |
| > > > investmentKey | String | 投资品键 |
| > > > marketId | String | 借贷市场 ID |
| > > > perpetual | Object | 永续合约信息 |
| > > > detailPath | String | Web 详情页重定向路径 |
| > > > yieldYesterday | BigDecimal | 昨日收益(USD) |
| > > > totalEarnings | BigDecimal | 总收益(USD) |
| > > investMarketTokenBalanceVoList | Array | 借贷市场维度持仓 |
| > > > assetMap | Object | 资产数据映射(包含供应和借款,value 结构同 investTokenBalanceVoList 元素) |
| > > > marketId | String | 市场标识 |
| > > > healthRate | Object | 市场健康率(有借款时不为空) |
| > > > marketRewards | Array | 市场奖励(结构同 availableRewards 元素) |
| > > > totalValue | String | 总价值(USD) |
| > > availableRewards | Array | 可领取奖励 |
| > > > baseDefiTokenInfos | Array | 奖励代币元素列表 |
| > > > buttonType | Integer | 按钮类型(0: 不显示, 1: 需要授权, 2: 禁用, 3: 启用) |
| > > > callDataExtJson | String | CallData 扩展 JSON |
| > > > claimMode | Integer | 领取模式(null=普通, 0=stake OKT, 1=跳转二级页面) |
| > > > extraData | Array | 奖励详情扩展数据 |
| > > > > coinAmount | String | 可领取数量(字符串精度值) |
| > > > > principalIndex | String | 本金批次/索引标识;可用于claim接口rewardType类型为UNLOCKED_PRINCIPAL时传入 |
| > > > > claimable | Boolean | 是否可领取(true/false) |
| > > > > status | String | 领取状态(示例:CLAIMABLE 表示可领取) |
| > > > rewardType | String | 奖励类型字符串(REWARD_INVESTMENT、REWARD_PLATFORM、V3_FEE、REWARD_OKX_BONUS、REWARD_MERKLE_BONUS、UNLOCKED_PRINCIPAL) |
| > > > unclaimedTokenList | Array | Merkl bonus 未领取代币列表(按链) |
| > > > network | String | 网络名称 |
| > > > chainIndex | String | 链 ID |
| > > > urlInfo | Object | URL 跳转信息 |
| > > > currencyAmount | String | 币种金额 |
| > > fundsInfo | Array | 资金信息(结构同 availableRewards 元素) |
| > > airDropRewardInfo | Array | 空投奖励(结构同 availableRewards 元素) |
| > > extraData | Object | 扩展数据 |
| > walletId | String | 钱包ID |
| platformName | String | 平台名称 |
| analysisPlatformId | String | 解析组平台ID |
| platformLogo | String | 平台 Logo |
| platformUrl | String | 平台 URL |
响应示例#
Json
{
"code": "0",
"msg": "",
"data": [
{
"walletIdPlatformDetailList": [
{
"networkHoldVoList": [
{
"network": "Ethereum",
"chainIndex": "1",
"isSupportInvest": true,
"totalAssert": "0.8152800000000020382",
"investTokenBalanceVoList": [
{
"investmentName": "ETH",
"investmentId": 22850,
"specialPositionAssetKey": "1-0x308861a430be4cce5502d0a12724771fc6daf216-0x35fa164735182de50811e8e2e824cfb9b6118ac25",
"aggregateProductId": 73676,
"isInvestTypeSupport": true,
"investType": 5,
"investName": "Stake",
"investLogo": {
"middleLogoList": [
{
"tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
"tokenName": "ETH"
}
],
"bottomRightLogoList": [
{
"tokenLogo": "https://static.coinall.ltd/cdn/invest/platform/EtherFi.png",
"tokenName": "ether.fi"
}
],
"topRightLogoList": [
{
"tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
"tokenName": "ETH"
}
],
"topLeftLogoList": []
},
"assetsTokenList": [
{
"tokenSymbol": "ETH",
"tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
"coinAmount": "0.000000000000000001",
"currencyAmount": "0.0000000000000020382",
"tokenPrecision": 18,
"tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"network": "ETH"
}
],
"rewardDefiTokenInfo": [],
"fundsInfo": [
{
"baseDefiTokenInfos": [
{
"tokenSymbol": "ETH",
"tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
"coinAmount": "0.0002",
"currencyAmount": "0.40764",
"tokenPrecision": 18,
"tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"network": "ETH",
"buttonType": 3,
"callDataExtJson": "{\"isExtraReward\":true}"
}
],
"callDataExtJson": "{\"isExtraReward\":true}",
"extraData": {
"claimDetails": [
{
"coinAmount": "0.000100000000000000",
"principalIndex": "72021",
"claimable": true,
"status": "CLAIMABLE"
},
{
"coinAmount": "0.000100000000000000",
"principalIndex": "72452",
"claimable": true,
"status": "CLAIMABLE"
}
]
},
"rewardType": "UNLOCKED_PRINCIPAL"
}
],
"extraData": {},
"totalValue": "0.4076400000000020382",
"investmentCategory": 0,
"investmentKey": "1-0x308861a430be4cce5502d0a12724771fc6daf216-0x35fa164735182de50811e8e2e824cfb9b6118ac2",
"marketId": "",
"detailPath": "ether-fi-ethereum-eth-22850"
},
{
"investmentName": "ETH",
"specialPositionAssetKey": "1-0x7d5706f6ef3f89b3951e23e557cdfbc3239d4e2c-72021-08",
"isInvestTypeSupport": false,
"investType": 8,
"investName": "Locked Staking",
"investLogo": {
"middleLogoList": [
{
"tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
"tokenName": "ETH"
}
]
},
"assetsTokenList": [
{
"tokenSymbol": "ETH",
"tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
"coinAmount": "0.0001",
"currencyAmount": "0.20382",
"tokenPrecision": 18,
"tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"network": "ETH"
}
],
"rewardDefiTokenInfo": [],
"extraData": {},
"totalValue": "0.20382",
"investmentCategory": 0,
"investmentKey": "1-0x7d5706f6ef3f89b3951e23e557cdfbc3239d4e2c-72021-0",
"marketId": ""
},
{
"investmentName": "ETH",
"specialPositionAssetKey": "1-0x7d5706f6ef3f89b3951e23e557cdfbc3239d4e2c-72452-08",
"isInvestTypeSupport": false,
"investType": 8,
"investName": "Locked Staking",
"investLogo": {
"middleLogoList": [
{
"tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
"tokenName": "ETH"
}
]
},
"assetsTokenList": [
{
"tokenSymbol": "ETH",
"tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
"coinAmount": "0.0001",
"currencyAmount": "0.20382",
"tokenPrecision": 18,
"tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"network": "ETH"
}
],
"rewardDefiTokenInfo": [],
"extraData": {},
"totalValue": "0.20382",
"investmentCategory": 0,
"investmentKey": "1-0x7d5706f6ef3f89b3951e23e557cdfbc3239d4e2c-72452-0",
"marketId": ""
}
],
"investMarketTokenBalanceVoList": [],
"availableRewards": [],
"airDropRewardInfo": [],
"extraData": {}
}
],
"walletId": "1a33c32f-2b8d-426e-9be2-33445f0fcd87"
}
],
"platformName": "ether.fi",
"analysisPlatformId": "260",
"platformLogo": "https://static.coinall.ltd/cdn/invest/platform/EtherFi.png",
"platformUrl": "https://app.ether.fi"
}
]
}