curl --request POST \
--url https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
Returns true if the client is actively listening for network connections. This method checks if the node is accepting incoming connections from peers on the network.
curl --request POST \
--url https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
net_listening
JSON-RPC method returns true if the client is actively listening for network connections. This method is useful for checking the network connectivity status of the Hyperliquid EVM node and verifying that it can accept incoming peer connections.
params
field should be an empty array.
result
— Boolean value indicating if the client is actively listening for network connections// Check if node is listening for network connections
const checkNodeListening = async () => {
const response = await fetch('https://hyperliquid-mainnet.core.chainstack.com/YOUR_ENDPOINT/evm', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'net_listening',
params: [],
id: 1
})
});
const data = await response.json();
return data.result;
};
// Monitor network connectivity status
const monitorNetworkStatus = async () => {
try {
const isListening = await checkNodeListening();
if (isListening) {
console.log('✅ Node is listening for network connections');
} else {
console.log('❌ Node is not accepting network connections');
}
return isListening;
} catch (error) {
console.error('Error checking network status:', error);
return false;
}
};
// Health check implementation
const performHealthCheck = async () => {
const networkStatus = await monitorNetworkStatus();
return {
network: {
listening: networkStatus,
status: networkStatus ? 'healthy' : 'degraded'
},
timestamp: new Date().toISOString()
};
};
// Usage
performHealthCheck().then(health => {
console.log('Node health check:', health);
});
curl -X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":1}' \
https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm
net_listening
method is essential for applications that need to:
Successful response with the listening status
The response is of type object
.