Wallet API

Holdings Detail#

Call this endpoint when a user wants to view detailed holdings in a specific DeFi protocol. Requires wallet address list and target protocol information (analysisPlatformId obtained from the previous protocol list endpoint). The response includes detailed asset information for each investment product, V3 position information, claimable rewards, etc. Based on the returned investmentId and position information, you can further call the transaction execution API to redeem or claim rewards.

URL: POST /api/v6/defi/user/asset/platform/detail

Request Parameters#

FieldTypeRequiredExplanation
walletAddressListArrayYesWallet list
> chainIndexStringYesChain ID
> walletAddressStringYesWallet address
> pubKeyStringNoPublic key (only used for BTC investment products)
platformListArrayYesDeFi protocols to query
> chainIndexStringNoChain ID
> analysisPlatformIdStringNoProtocol ID

Request Example#

Example 1: Query by protocol ID#

Json
{
    "walletAddressList": [
        {
            "chainIndex": "1",
            "walletAddress": "0x7f429edeff8afc7bb3a2cf7db832fc86f6fa99da"
        }
    ],
    "platformList": [
        {
            "chainIndex": "1",
            "analysisPlatformId": "44"
        }
    ]
}

Response Parameters#

FieldTypeExplanation
walletIdPlatformDetailListArrayHoldings by wallet
> networkHoldVoListArrayHoldings by network
> > networkStringNetwork name
> > chainIndexStringChain ID
> > isSupportInvestBooleanWhether investment is supported
> > totalAssertStringTotal assets (USD)
> > investTokenBalanceVoListArrayHoldings by investment product
> > > investmentNameStringInvestment product name
> > > validatorNameStringValidator name
> > > currentPriceStringCurrent price (e.g., 1 DAI - 1.0393 USDC)
> > > investmentIdStringInvestment product ID
> > > specialPositionAssetKeyStringSpecial position asset key
> > > sourceInvestmentIdStringSource investment product ID
> > > feeRateStringFee rate (used by Uni V3, e.g., 0.0003)
> > > aggregateProductIdStringAggregate product ID
> > > isInvestTypeSupportBooleanWhether the investment type is supported
> > > investTypeIntegerInvestment type (1:save, 2:pool, 3:farm, 4:vaults, 5:stake, 6:borrow, 7:staking, 8:locked, 9:deposit, 10:vesting)
> > > investNameStringInvestment type description
> > > investLogoObjectInvestment product logo information
> > > positionListArrayPosition detail list
> > > > rangeStringPrice range (e.g., 0.892 - 0.992 USDC per DAI)
> > > > reverseRangeStringReverse price range
> > > > rangeInfoObjectPrice range details
> > > > tokenIdStringNFT tokenId (e.g., 93828)
> > > > positionNameStringPosition name
> > > > nftLogoStringNFT Logo
> > > > positionStatusStringPosition status (ACTIVE, INACTIVE)
> > > > assetsTokenListArrayAsset token list
> > > > showIncreaseLiquiditybooleanWhether to show increase liquidity
> > > > rewardDefiTokenInfoArrayCompound rewards (same structure as availableRewards element)
> > > > unclaimFeesDefiTokenInfoArrayUni V3 fees (same structure as availableRewards element)
> > > > totalValueStringTotal value (USD)
> > > > isNarrowBooleanWhether the range is too narrow
> > > > needInvestBooleanWhether investment is needed (true: needs investment, false: already invested)
> > > > settlementTimeStringSettlement time (second-level timestamp)
> > > > assetPositionTypeStringPosition type (0: Uni V3 position, 1: position with expiration)
> > > > positionExtInfoListArrayPosition extended information list
> > > assetsTokenListArrayAsset token list
> > > borrowTokenListArrayBorrow token list (LSDFI)
> > > rewardDefiTokenInfoArrayCompound rewards (same structure as availableRewards element)
> > > fundsInfoArrayFunds information (same structure as availableRewards element)
> > > extraDataObjectDetail page extended data
> > > totalValueStringTotal value (USD)
> > > overflowTotalValueStringOverflow total value (USD)
> > > collateralRatioInfoObjectCollateral ratio information (LSDFI)
> > > rewardAddressStringBTC reward receiving address
> > > maturityTimeStringPendle maturity time
> > > fixedApyStringPendle fixed APY
> > > browserUrlStringOKLink explorer URL
> > > poolIdStringPool ID
> > > poolAddressStringPool address
> > > tagListArrayTag list
> > > investNameTagListArrayInvestment name tag list
> > > extraFieldListArrayExtra display field list
> > > subTitleStringSubtitle (e.g., ID: 205c8e01aa#12)
> > > investmentCategoryIntegerInvestment category (0: Earn, 1: Brc20, 2: LSDFI)
> > > investmentClassifyStringInvestment classification
> > > nonPoolPositionListArrayNon-UniV3 investment product position list
> > > investmentKeyStringInvestment key
> > > marketIdStringLending market ID
> > > perpetualObjectPerpetual contract information
> > > detailPathStringWeb detail page redirect path
> > > yieldYesterdayBigDecimalYesterday's yield (USD)
> > > totalEarningsBigDecimalTotal earnings (USD)
> > investMarketTokenBalanceVoListArrayHoldings by lending market
> > > assetMapObjectAsset data mapping (includes supply and borrow, value structure same as investTokenBalanceVoList element)
> > > marketIdStringMarket identifier
> > > healthRateObjectMarket health rate (non-null when there are borrows)
> > > marketRewardsArrayMarket rewards (same structure as availableRewards element)
> > > totalValueStringTotal value (USD)
> > availableRewardsArrayClaimable rewards
> > > baseDefiTokenInfosArrayReward token element list
> > > buttonTypeIntegerButton type (0: hidden, 1: requires authorization, 2: disabled, 3: enabled)
> > > callDataExtJsonStringCallData extended JSON
> > > claimModeIntegerClaim mode (null=normal, 0=stake OKT, 1=redirect to secondary page)
> > > extraDataArrayReward detail extended data
> > > > coinAmountStringClaimable amount (string precision value)
> > > > principalIndexStringPrincipal batch/index identifier; can be passed in the claim API when rewardType is UNLOCKED_PRINCIPAL
> > > > claimableBooleanWhether claimable (true/false)
> > > > statusStringClaim status (e.g., CLAIMABLE means claimable)
> > > rewardTypeStringReward type string (REWARD_INVESTMENT, REWARD_PLATFORM, V3_FEE, REWARD_OKX_BONUS, REWARD_MERKLE_BONUS, UNLOCKED_PRINCIPAL)
> > > unclaimedTokenListArrayMerkl bonus unclaimed token list (by chain)
> > > networkStringNetwork name
> > > chainIndexStringChain ID
> > > urlInfoObjectURL redirect information
> > > currencyAmountStringCurrency amount
> > fundsInfoArrayFunds information (same structure as availableRewards element)
> > airDropRewardInfoArrayAirdrop rewards (same structure as availableRewards element)
> > extraDataObjectExtended data
> walletIdStringWallet ID
platformNameStringPlatform name
analysisPlatformIdStringAnalysis group platform ID
platformLogoStringPlatform Logo
platformUrlStringPlatform URL

Response Example#

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