Wallet API

Holdings Overview#

Call this endpoint when a user wants to view their overall holdings across DeFi protocols. Pass the user's wallet address list (one wallet per chain, supports multiple chains simultaneously), and it returns the holdings overview for each DeFi protocol (protocol name, total assets in USD, number of investment products, etc.). After obtaining the analysisPlatformId, you can call /api/v6/defi/user/asset/platform/detail to view detailed holdings.

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

Request Parameters#

FieldTypeRequiredExplanation
walletAddressListArrayYesWallet address list
> chainIndexStringYesChain ID
> walletAddressStringYesWallet address
> pubKeyStringNoPublic key (only used for BTC investment products)
tagStringNoCustom tag

Request Examples#

Example 1: Query a single wallet's protocol holdings on ETH#

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

Example 2: Query multiple wallets' protocol holdings across multiple chains#

Json
{
    "walletAddressList": [
        {
            "chainIndex": "1",
            "walletAddress": "0x1234567890123456789012345678901234567890"
        },
        {
            "chainIndex": "56",
            "walletAddress": "0x1234567890123456789012345678901234567890"
        },
        {
            "chainIndex": "137",
            "walletAddress": "0x1234567890123456789012345678901234567890"
        }
    ],
    "tag": "portfolio_check"
}

Response Parameters#

FieldTypeExplanation
walletIdPlatformListArrayProtocol list by wallet
> platformListArrayProtocol list
> > platformNameStringProtocol name
> > analysisPlatformIdStringProtocol ID
> > platformLogoStringProtocol Logo
> > currencyAmountStringProtocol total assets (USD)
> > isSupportInvestBooleanWhether investment is supported
> > platformUrlStringProtocol URL
> > networkBalanceListArrayAssets by chain
> > > networkStringChain name
> > > networkLogoStringChain logo
> > > chainIndexStringChain chainId
> > > currencyAmountStringProtocol total assets on this chain (USD)
> > > investmentCountIntegerNumber of investment products
> > investmentCountIntegerNumber of investment products
> walletIdStringWallet ID
> accountIdStringAccount ID
> totalAssetsStringWallet total assets (USD)
updateAtStringUpdate timestamp (milliseconds)
assetStatusintAsset status: 1=updated, 2=updating

Response Example#

Base chain single wallet query

Json
{
    "code": 0,
    "msg": "",
    "data": {
        "walletIdPlatformList": [
            {
                "platformList": [
                    {
                        "platformName": "Aave V3",
                        "analysisPlatformId": "10",
                        "platformLogo": "https://static.coinall.ltd/cdn/web3/protocol/logo/aave-v3.png/type=png_350_0?v=1774419400100",
                        "currencyAmount": "1.842485290389950657798412062008333407",
                        "isSupportInvest": true,
                        "platformUrl": "https://app.aave.com",
                        "networkBalanceList": [
                            {
                                "network": "BASE",
                                "networkLogo": "https://static.coinall.ltd/cdn/web3/invest/network/logo/base_new.png",
                                "chainIndex": "8453",
                                "currencyAmount": "1.842485290389950657798412062008333407",
                                "investmentCount": 3
                            }
                        ],
                        "investmentCount": 3
                    },
                    {
                        "platformName": "Morpho",
                        "analysisPlatformId": "119170",
                        "platformLogo": "https://static.coinall.ltd/cdn/web3/protocol/logo/morphoblue-none.png/type=png_350_0?v=1774419195442",
                        "currencyAmount": "1.01000616616",
                        "isSupportInvest": true,
                        "platformUrl": "https://app.morpho.org",
                        "networkBalanceList": [
                            {
                                "network": "BASE",
                                "networkLogo": "https://static.coinall.ltd/cdn/web3/invest/network/logo/base_new.png",
                                "chainIndex": "8453",
                                "currencyAmount": "1.01000616616",
                                "investmentCount": 1
                            }
                        ],
                        "investmentCount": 1
                    },
                    {
                        "platformName": "Compound V3",
                        "analysisPlatformId": "144",
                        "platformLogo": "https://static.coinall.ltd/cdn/web3/protocol/logo/compound-v3.png/type=png_350_0?v=1774418057245",
                        "currencyAmount": "0.358024146564053025",
                        "isSupportInvest": true,
                        "platformUrl": "https://v3-app.compound.finance",
                        "networkBalanceList": [
                            {
                                "network": "BASE",
                                "networkLogo": "https://static.coinall.ltd/cdn/web3/invest/network/logo/base_new.png",
                                "chainIndex": "8453",
                                "currencyAmount": "0.358024146564053025",
                                "investmentCount": 3
                            }
                        ],
                        "investmentCount": 3
                    }
                ],
                "walletId": "a11a9be9-00b9-43de-b450-6e090a58297a",
                "accountId": "a11a9be9-00b9-43de-b450-6e090a58297a",
                "totalAssets": "3.216207599599296551158095653123634461"
            }
        ],
        "updateAt": 1774429492000,
        "assetStatus": 1
    }
}

The actual response returns 4 protocols; only the first 3 are shown here. currencyAmount is denominated in USD, and assetStatus=1 indicates that data has been fully updated.