Wallet API

Address Validation#

Provide an address to determine if it is a valid user or contract address.

Request Path#

GET https://www.okx.com/api/v5/waas/wallet/pre-transaction/validate-address

Request Parameters#

ParameterTypeRequiredDescription
chainIndexStringYesUnique identifier for the chain
addressStringYesAddress

Response Parameters#

ParameterTypeDescription
resultString0: Invalid address format
1: Valid user address
2: Valid contract address

Request Example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/waas/wallet/validate-address?chainIndex=1&address=0xdf54b6c6195ea4d948d03bfd818d365cf175cfc2&addressType=0' \
--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 '{
    "chainIndex": "1",
    "address": "0xdac17f958d2ee523a2206206994597c13d831ec7"
}'

Response Example#

200
{
    "code": "0", 
    "data": [
        {
           "result": "1"
        }
    ],
    "msg": "success"
}