net_listening - Optimism
Returns true if client is actively listening for network connections.

Parameters

none

Returns

Boolean - true when listening, otherwise false.

Example

Request
Curl
Postman
1
curl https://opt-mainnet.g.alchemy.com/v2/your-api-key \
2
-X POST \
3
-H "Content-Type: application/json" \
4
-d '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":67}'
Copied!
1
URL: https://opt-mainnet.g.alchemy.com/v2/your-api-key
2
RequestType: POST
3
Body:
4
{
5
"jsonrpc":"2.0",
6
"method":"net_listening",
7
"params":[],
8
"id":67
9
}
Copied!
Result
1
{
2
"jsonrpc": "2.0",
3
"id": 67,
4
"result": true
5
}
Copied!
Optimism API
Alchemy Documentation
Copy link
Contents