Query the token assets of all, or assets on specificed chain, or some selected tokens under the specific wallet.
POST https://www.okx.com/api/v5/waas/asset/get-assets
Parameter | Type | Required | Description |
---|---|---|---|
walletId | String | Yes | Unique identifier of the wallet |
chainIds | Array<String> | No | List of unique identifiers of the chain (if present, and there is no coinId dimension, query by chainId dimension) |
coinIds | Array<String> | No | Coin information (if present, query by coinId dimension) |
tokenAssets
Parameter | Type | Description |
---|---|---|
tokenAssets | Array | Token assets |
>chainId | String | Unique identifier of the chain |
>name | String | Address of a chain |
>symbol | String | Token abbreviation |
>balance | String | Token balance |
>coinId | String | Unique identifier of the token |
>coinPrice | String | Coin unit price (USDT) |
brc20TokenAssets | Array | BRC20 Token assets |
>chainId | String | Unique identifier of the chain |
>name | String | Address of a chain |
>symbol | String | Token abbreviation |
>totalBalance | String | Token balance |
>coinId | String | Unique identifier of the token |
>coinPrice | String | Coin unit price (USDT) |
>availableBalance | String | balance of inscribe available |
>transferableBalance | String | balance of transferable |
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"]
}'
{
"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"
}
]
}
]
}