net_version
Get network ID on the Hyperliquid network.
Parameters
Varies by method. Please refer to the official Ethereum JSON-RPC: net_version documentation for detailed parameter information.
Returns
The return value depends on the specific method being called.
Implementation Example
- cURL
 - JavaScript
 
curl -X POST https://api-hyperliquid-mainnet-evm.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "net_version",
    "params": [],
    "id": 1
  }'
const response = await fetch('https://api-hyperliquid-mainnet-evm.n.dwellir.com/YOUR_API_KEY', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'net_version',
    params: [],
    id: 1
  })
});
const data = await response.json();
console.log(data.result);
Response Example
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x..."
}
Need help? Contact our support team or check the Hyperliquid documentation.