Wallet API
Get Total Token Asset Value

Get Total Token Asset Value#

Query the estimated value of all token assets under a wallet account, in USD.

Note
Currently, only user wallet accounts are supported.
Before querying the total asset value, the token range must be specified through the Add Token interface.

Request Path#

GET https://www.okx.com/api/waas/wallet/asset/total-token-value

Request Parameters#

ParameterTypeRequiredDescription
accountIdStringYesUnique identifier of the account
chainsArrayNoList of chainIndex, can filter the token display by chain dimension. The maximum number of elements in the list is 20

Response Parameters#

ParameterTypeDescription
valueStringEstimated value of token assets

Request Example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/waas/wallet/asset/total-token-value?accountId=44486e05-3235-2f8e-5fe2-a8ab46217863&chains=1,2' \
--header 'Content-Type: application/json' \
--header 'OK-ACCESS-PROJECT: 86af********d1bc' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'

Response Example#

200
{
    "code": "0",
    "msg": "success",
    "data": [
        {
            "value": "123445.12"    
        }
    ]
}