Starts a subscription and pushes notifications.
Creates a subscription. Live-tested subscription types on this endpoint: newHeads (a full block header is pushed for every block) and newPendingTransactions (a transaction hash is pushed for every mempool transaction). The reply returns the subscription id; afterwards notifications arrive as {"jsonrpc":"2.0","method":"eth_subscription","params":{"subscription":,"result":}} without a request id. BSC produces blocks sub-second, so notifications are frequent.
Body
JSON-RPC 2.0 request for eth_subscribe, sent as a text message over the WebSocket connection.
jsonrpcstringrequiredidintegerrequiredRequest identifier echoed back in the response.
methodstringrequiredparamsArray<string>newHeadsnewPendingTransactionsrequiredParameters
apiKeystringrequiredpathNOWNodes API key. Connect to wss://bsc.nownodes.io/wss/{apiKey}. The WebSocket handshake returns HTTP 403 when the key is missing or invalid.
Response
JSON-RPC response delivered over the WebSocket connection. Errors are reported inside the same envelope in the error field; see RpcError (live: code -32602 Invalid params for malformed arguments). Example notification for newHeads is stored in the NewHeadsNotification schema (live capture).
Forbidden. The WebSocket handshake was rejected: the API key is missing or invalid (verified live: wrong and missing keys both return HTTP 403).