DeFi API

查询用户的赎回申请列表#

描述:该 API 将提供用户某个投资品已申请过赎回,可赎回本金加奖励金的列表。目前有 Ankr、BENQI、Stader、Lido、Tranchess 这些协议支持。

请求地址#

GET https://www.okx.com/api/v5/defi/user/investment/unstake-list

请求参数#

参数名称相关描述参数类型必传数据类型
investmentId投资品 ID (这里获取)请求体String
userAddress用户钱包地址请求体String

响应参数#

参数名称相关描述数据类型
userAddress用户钱包地址String
investmentId投资品 IDString
canClaimAll是否可以全部领取Boolean
coinAmount币中数额总数String
currencyAmount币种美元价值总数String
rewardTokenInfos奖励代币信息String
>rewardType奖励类型String
>claimIndex领取索引String
>tokenSymbol币种标识String
>tokenLogo币种 logo 网址String
>tokenAddress币种合约地址String
>network币种网络String
>tokenPrecision币种精度String
>coinAmount币种数量String
>currencyAmount币种数量美元价值String
>rewardDescription奖励描述String
>rewardTip奖励贴士String

请求示例#

shell
curl --location 'http://www.okx.com/api/v5/defi/user/investment/unstake-list?investmentId=10005&userAddress=0x7f****da' \
--header 'OK-ACCESS-KEY: 90****d6' \
--header 'OK-ACCESS-PASSPHRASE: p****d' \

响应示例#

200
{
  "code": 0,
  "msg": "",
  "data": {
  "userAddress": "0x7f****da",
  "investmentId": 10005,
  "canClaimAll": false,
  "coinAmount": "3.545420552003607329",
  "currencyAmount": "1.574166725089601654076",
  "rewardTokenInfos": [
{
  "rewardType": 2,
  "claimIndex": "0",
  "tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
  "network": "AVAX",
  "tokenSymbol": "AVAX",
  "tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/AVAX.png",
  "tokenPrecision": "18",
  "coinAmount": "2.393874828838042349",
  "currencyAmount": "1.062880424004090802956",
  "buttonType": 3,
  "rewardDesc": "By tapping Claim, you’ll redeem sAVAX",
  "rewardTip": "This number refers to the amount of AVAX you can claim. According to the protocol, you’ll claim sAVAX as the claim time is overdue."
},
{
  "rewardType": 2,
  "claimIndex": "1",
  "tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
  "network": "AVAX",
  "tokenSymbol": "AVAX",
  "tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/AVAX.png",
  "tokenPrecision": "18",
  "coinAmount": "1.004954892370271051",
  "currencyAmount": "0.446199972212400346644",
  "buttonType": 3,
  "rewardDesc": "By tapping Claim, you’ll redeem sAVAX",
  "rewardTip": "This number refers to the amount of AVAX you can claim. According to the protocol, you’ll claim sAVAX as the claim time is overdue."
},
{
  "rewardType": 3,
  "claimIndex": "2",
  "tokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
  "network": "AVAX",
  "tokenSymbol": "AVAX",
  "tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/AVAX.png",
  "tokenPrecision": "18",
  "coinAmount": "0.146590830795293929",
  "currencyAmount": "0.065086328873110504476",
  "buttonType": 2,
  "rewardDesc": "Est. claimable date: 07/12/23",
  "rewardTip": "This only refers to the estimated claimable time. The exact time is subject to your actual claim."
}
  ]
}
}