Wallet API
Query wallet token /inscription assets

Query wallet token /inscription assets#

Query the token assets of all, or assets on specificed chain, or some selected tokens under the specific wallet.

Request URL#

POST https://www.okx.com/api/v5/waas/asset/get-assets

Request parameters#

ParameterTypeRequiredDescription
walletIdStringYesUnique identifier of the wallet
chainIdsArray<String>NoList of unique identifiers of the chain (if present, and there is no coinId dimension, query by chainId dimension)
coinIdsArray<String>NoCoin information (if present, query by coinId dimension)

Response parameters#

tokenAssets

ParameterTypeDescription
tokenAssetsArrayToken assets
>chainIdStringUnique identifier of the chain
>nameStringAddress of a chain
>symbolStringToken abbreviation
>balanceStringToken balance
>coinIdStringUnique identifier of the token
>coinPriceStringCoin unit price (USDT)
brc20TokenAssetsArrayBRC20 Token assets
>chainIdStringUnique identifier of the chain
>nameStringAddress of a chain
>symbolStringToken abbreviation
>totalBalanceStringToken balance
>coinIdStringUnique identifier of the token
>coinPriceStringCoin unit price (USDT)
>availableBalanceStringbalance of inscribe available
>transferableBalanceStringbalance of transferable

Request example#

shell
curl --location --request POST 'https://www.okx.com/api/v5/waas/asset/get-assets' \
--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' \
--data-raw '{
    "walletId": "13886e05-1265-4b79-8ac3-b7ab46217655",
    "chainIds":["1"]
    "coinIds":["1"]
}'

Response example#

200
{
    "code": 0,
    "msg": "success",
    "data": [
        {
            "tokenAssets": [
                {
                    "address": "0xa64f953f379087b1e51b64ca12704b5af2cf0dd8",
                    "chainId": "1",
                    "coinId": "130",
                    "symbol": "PMA",
                    "balance": "395145.756353546338598187",
                    "coinPrice": "0.000001882732934029"
                },
                {
                    "address": "0xa64f953f379087b1e51b64ca12704b5af2cf0dd8",
                    "chainId": "56",
                    "coinId": "5036",
                    "symbol": "SAFEMOON",
                    "balance": "2903240.945298975",
                    "coinPrice": "0.000000003621432734"
                },
                {
                    "address": "bc1psnr548clz3f4fz6jmpnw5eqzj2v2musk082wp8fvq5ac3p5ete6qg05u8u",
                    "chainId": "0",
                    "coinId": "1",
                    "symbol": "BTC",
                    "balance": "0.00311441",
                    "coinPrice": "41645.8"
                }
            ],
            "brc20TokenAssets": [
                {
                    "address": "bc1psnr548clz3f4fz6jmpnw5eqzj2v2musk082wp8fvq5ac3p5ete6qg05u8u",
                    "chainId": "0",
                    "coinId": "1115139",
                    "symbol": "tokb",
                    "totalBalance": "10.00000000000000000", // DEPLOY max
                    "availableBalance": "3.00000000000000000", //剩余可造币量 Remaining mintable amt
                    "transferableBalance": "7.00000000000000000",//已inscribe为可转让的金额 Amt that already inscribed as transferable
                    "coinPrice": "0"
                }
            ]
        }
    ]
}