Listen to transactions
Transactions are exposed via subscriptions over WebSocket. Applications can create subscriptions using our official SDKs or via standard eth_subscribe
JSON-RPC methods. SDKs are faster, but websockets are more convenient.
Ethereum, Polygon and Binance Smart Chain are currently supported.
Get an API Key in the Merkle Developer Dashboard
newPendingTransactions
Our standard RPC interface seamlessly integrates with existing applications. The transaction stream is accessible through standard eth_subscribe
commands, ensuring compatibility with a wide range of existing Web3 libraries and tools. By leveraging this functionality, developers can easily subscribe to real-time notifications of transaction events.
The RPC endpoint structure is the following
wss://txs.merkle.io/rpc/{api-key}/{chain-id}
The chain ID must follow the format described in the table and defaults to mainnet when omitted:
Mainnet
1
| eth
| mainnet
Polygon
137
| polygon
BSC
56
| bsc
Pending transaction with just hashes
This is the RPC method to retrieve pending transaction hashes.
Request
Response
Pending transactions with full body
This is the RPC method to retrieve full detailed pending transactions.
Request
Response
Official SDKs
An alternative way to subscribe the transactions stream is to use our official SDKs, released in different programming languages. In this scenario transactions are pushed as a stream of RLP (Recursive Length Prefix) encoded bytes. This is the raw format transactions used by our worldwide network.
The RLP WebSocket endpoint structure is the following
wss://txs.merkle.io/ws/{api-key}/{chain-id}
SDKs and their relative documentation are available here
Last updated