Querying Supported Blockchains for Wallet API Integration

·

Overview

The Wallet API provides comprehensive support for retrieving information about various blockchain networks, including Bitcoin and Ethereum. This includes network logos, native token identifiers, and other essential chain metadata—beyond the token data APIs covered in other sections.


API Request Details

Endpoint

Method: GET
Path: https://web3.okx.com/api/v5/wallet/chain/supported-chains

Parameters

No additional parameters required.


Response Parameters

ParameterTypeDescription
nameStringFull blockchain name (e.g., "Ethereum")
logoUrlStringURL of the chain's logo image
shortNameStringAbbreviated name (e.g., "ETH")
chainIndexStringUnique chain identifier

Example Usage

Request

curl --location --request GET 'https://web3.okx.com/api/v5/wallet/chain/supported-chains' \
--header 'Content-Type: application/json' \
--header 'OK-ACCESS-KEY: YOUR_API_KEY' \
--header 'OK-ACCESS-SIGN: YOUR_SIGNATURE' \
--header 'OK-ACCESS-TIMESTAMP: CURRENT_TIMESTAMP'

Response

{
  "code": "0",
  "data": [
    {
      "name": "Ethereum",
      "logoUrl": "https://example.com/eth.png",
      "shortName": "ETH",
      "chainIndex": "1"
    }
  ],
  "msg": ""
}

Key Use Cases

  1. Multi-Chain Wallet Integration: Identify supported networks for asset management.
  2. UI Development: Fetch logos and naming conventions for frontend displays.
  3. Interoperability: Verify chain compatibility before cross-chain transactions.

👉 Explore advanced Web3 API features to enhance your dApp's capabilities.


FAQs

Q1: How frequently is the supported chains list updated?
A1: The list is dynamically updated to include new networks—check the API periodically for changes.

Q2: Can I filter chains by type (e.g., EVM-compatible)?
A2: Currently, no filtering parameters exist, but response data includes metadata for manual filtering.

Q3: Is there a rate limit for this endpoint?
A3: Standard API rate limits apply (refer to the developer docs for details).

Q4: Are testnets included in the response?
A4: Only mainnets are returned by default. Testnet support requires separate configuration.


Best Practices

👉 Learn how to optimize Web3 integrations with our developer toolkit.