eth_subscribe
Starts a WebSocket subscription for newHeads or logs (and pending transactions if supported by the backend).
Mantle Mainnet (chain ID 5000 / 0x1388). Gas token: MNT.
Transport: JSON-RPC 2.0 as a WebSocket text frame. The OpenAPI POST operation is a documentation representation only; do not send HTTP POST or curl to a wss:// URL.
WebSocket endpoint:
wss://mantle.nownodes.io/wss/{api_key}Connect using a valid NOWNodes API key in the path, then send:
wscat -c 'wss://mantle.nownodes.io/wss/YOUR_API_KEY'
> {"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}Response examples below are illustrative unless a fixed protocol constant is specified (e.g. chain ID). They were not captured from a live NOWNodes Mantle endpoint.
Mantle-specific notes: The first response returns a subscription ID. Afterwards the server sends eth_subscription notifications to this same live WSS connection. Recommended types: newHeads and logs (with an optional {address, topics} filter). newPendingTransactions may depend on upstream mempool visibility. The nonstandard minedTransactions type from the original examples is intentionally not claimed as supported.
Notification after the initial response, only when an event arrives:
{
"jsonrpc": "2.0",
"method": "eth_subscription",
"params": {
"subscription": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"result": {
"number": "0x123456",
"hash": "0x1111111111111111111111111111111111111111111111111111111111111111"
}
}
}For log events, result is a log object instead of a block header.
Body
JSON-RPC 2.0 text frame sent over an established WebSocket connection, not an HTTP request.
jsonrpcstringrequiredidintegerrequiredmethodstringeth_subscriberequiredparamsArray<any>requiredParameters
api_keystringrequiredpathNOWNodes API key used during the WebSocket handshake.
Response
Illustrative JSON-RPC message delivered over WebSocket ("200" is an OpenAPI documentation convention, not an HTTP response from a WS frame).