blockreq_supportedNetworks
此内容尚不支持你的语言。
Description
Section titled “Description”Returns all supported blockchain networks, including each network’s slug, name, chain ID, and endpoint URL template. Useful for discovering available networks before creating endpoints.
Parameters
Section titled “Parameters”None
Returns
Section titled “Returns”| Field | Type | Description |
|---|---|---|
networks | array | List of supported networks |
networks[].slug | string | Network slug for API use (e.g., ethereum) |
networks[].name | string | Human-readable name |
networks[].chainId | integer | EVM chain ID |
networks[].subdomain | string | Subdomain used in endpoint URLs |
networks[].httpsEndpoint | string | HTTPS endpoint URL template |
networks[].wssEndpoint | string | WSS endpoint URL template |
Request Example
Section titled “Request Example”{ "jsonrpc": "2.0", "method": "blockreq_supportedNetworks", "params": [], "id": 1}Response Example
Section titled “Response Example”{ "jsonrpc": "2.0", "id": 1, "result": { "networks": [ { "slug": "ethereum", "name": "Ethereum Mainnet", "chainId": 1, "subdomain": "eth-mainnet", "httpsEndpoint": "https://eth-mainnet.blockreq.com/v1/rpc/{API_KEY}", "wssEndpoint": "wss://eth-mainnet.blockreq.com/v1/rpc/{API_KEY}" }, { "slug": "bsc", "name": "BNB Smart Chain", "chainId": 56, "subdomain": "bsc-mainnet", "httpsEndpoint": "https://bsc-mainnet.blockreq.com/v1/rpc/{API_KEY}", "wssEndpoint": "wss://bsc-mainnet.blockreq.com/v1/rpc/{API_KEY}" } ] }}Code Examples
Section titled “Code Examples”curl -X POST https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"blockreq_supportedNetworks","params":[],"id":1}'const response = await fetch('https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', method: 'blockreq_supportedNetworks', params: [], id: 1, }),});const data = await response.json();console.log(data.result.networks);