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
Parameter | Type | Description |
---|---|---|
name | String | Full blockchain name (e.g., "Ethereum") |
logoUrl | String | URL of the chain's logo image |
shortName | String | Abbreviated name (e.g., "ETH") |
chainIndex | String | Unique 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
- Multi-Chain Wallet Integration: Identify supported networks for asset management.
- UI Development: Fetch logos and naming conventions for frontend displays.
- 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
- Cache Responses: Reduce API calls by storing chain data locally.
- Error Handling: Implement fallback mechanisms for failed logo URL fetches.
- Expandability: Design systems to accommodate future chain additions seamlessly.
👉 Learn how to optimize Web3 integrations with our developer toolkit.