Wallet API
Query Address by Balance

Query Address by Balance#

Query which addresses under the wallet account have a balance, returned in descending order of balance.

Request Path#

GET https://www.okx.com/api/v5/wallet/asset/addresses-by-token-balance

Request Parameters#

ParameterTypeRequiredDescription
accountIdStringYesUnique identifier of the account
chainIndexStringYesUnique identifier of the chain
tokenAddressStringYesToken contract address; if empty, query addresses with main chain currency balance
minBalanceStringYesMinimum balance, must be greater than 0
maxBalanceStringNoMaximum balance
limitStringNoNumber of records to return per query, default is 50, max is 100

Response Parameters#

ParameterTypeDescription
addressStringAddress with a balance under the accountid
valueStringBalance of the token
remarkStringNote associated with the address at wallet creation

Request Example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/wallet/asset/addresses-by-token-balance?accountId=2a966196-cfe3-4932-b709-927232d87177&minBalance=337&maxBalance=29334620&chainIndex=1&limit=50&tokenAddress=0xdac17f958d2ee523a2206206994597c13d831ec7' \
--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": "",
    "data": [
                {
                    "address": "0xd9e497bd8f491fe163b42a62c296fb54caea74b7",
                    "value": "180920178",
                    "remark": "No17"
                },
                {
                    "address": "0x0kd697bd8f491fe163b42a62c296fb54caea98kd",
                    "value": "723189",
                    "remark": "No89"
                },
                {
                    "address": "0x238193be9e80e68eace3588b45d8cf4a7eae0fa3",
                    "value": "1129",
                    "remark": "No13"
                }
    ]
}