For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_subscribe

POST wss://mainnet-ws.valuechain.xyz

Creates a subscription over WebSocket for new heads, logs, or pending transactions.

newHeads follows latest, not finalized. New heads arrive about every 2 seconds; safe and finalized typically lag that head by one slot. See block tags.

Use wss://mainnet-ws.valuechain.xyz or wss://testnet-ws.valuechain.xyz. HTTP returns notifications not supported.

Parameters

Name
Type
Required
Description

subscription

string

Yes

newHeads, logs, or newPendingTransactions.

options

object

No

For logs, an optional filter object.

Result

Subscription ID (data): Subscription identifier used with eth_unsubscribe. Subsequent messages arrive as JSON-RPC notifications.

Example

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1"
}

Code examples

cURL

JavaScript

Python

Last updated