Trade API

Get Supported Chains#

Retrieve information on chains supported for single-chain exchanges. The request returns supported target chains for cross-chain transactions.

Request URL#

GET https://web3.okx.com/api/v5/dex/aggregator/supported/chain

Request Parameters#

ParameterTypeRequiredDescription
chainIndexStringNoUnique identifier for the chain.
e.g., 1: Ethereum.
See more here.
chainIdStringNoUnique identifier for the chain.
It will be deprecated in the future.

Response Parameters#

ParameterTypeDescription
chainIndexStringUnique identifier for the chain.
chainIdStringUnique identifier for the chain.
It will be deprecated in the future.
chainNameStringChain name (e.g., Optimism).
dexTokenApproveAddressStringDEX authorization contract address; if no authorization has been made, this field will be empty.

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v5/dex/aggregator/supported/chain?chainIndex=1' \
--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",
    "data":[
          {
            "chainIndex":"1",
            "chainId":"1",
            "chainName":"Ethereum",
            "dexTokenApproveAddress": "0x40aA958dd87FC8305b97f2BA922CDdCa374bcD7f"
          },
    ],
    "msg":""
  }