开发者平台
主题

获取交易 API 支持的链#

查询交易 API 各接口支持的链。响应中的每一行代表一组接口与链的对应关系。

请求地址#

GET
https://web3.okx.com/api/v6/explorer/transaction/supported-chains

请求参数#

响应参数#

参数名类型描述
apiNameString模块内接口名称,不包含 transaction/ 前缀,例如 transaction-multi
chainIndexString链唯一标识,例如 Ethereum 为 1
chainNameString链名称,例如 Ethereum
chainSymbolString链的本链币符号,例如 ETH

请求示例#

shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/transaction/supported-chains' \
--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'

响应示例#

json
{
  "code": "0",
  "msg": "",
  "data": [
    {
      "apiName": "transaction-multi",
      "chainIndex": "1",
      "chainName": "Ethereum",
      "chainSymbol": "ETH"
    },
    {
      "apiName": "token-transfer-multi",
      "chainIndex": "1",
      "chainName": "Ethereum",
      "chainSymbol": "ETH"
    }
  ]
}