Utviklerportal
Tema

Get Active Chains for an Address#

Query which chains an address is active on (that is, has on-chain records), and whether the address is a contract address on each of them. One active chain is returned per row. Only EVM-format addresses are supported (0x prefix plus 40 hexadecimal characters).

Supported chains: see Get Address API Supported Chains (apiName: address-active-chain).

Request URL#

GET
https://web3.okx.com/api/v6/explorer/address/address-active-chain

Request Parameters#

ParameterTypeRequiredDescription
addressStringYesAddress. Only EVM-format addresses are supported (0x prefix plus 40 hexadecimal characters).

Response Parameters#

ParameterTypeDescription
chainIndexStringUnique identifier of the chain, e.g., 1 for ETH. Each row corresponds to one chain the address is active on.
isContractAddressBooleanWhether the address is a contract address on this chain.

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/address/address-active-chain?address=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' \
--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#

json
{
  "code": "0",
  "msg": "",
  "data": [
    {
      "chainIndex": "1",
      "isContractAddress": false
    },
    {
      "chainIndex": "56",
      "isContractAddress": false
    },
    {
      "chainIndex": "137",
      "isContractAddress": false
    }
  ]
}