All Products

Tenderly Node
Batching JSON-RPC requests

Batching JSON-RPC requests

JSON RPC requests batching allows you to send several JSON-RPC method invocations within a single HTTPS call. A batch request consists of an array of individual JSON-RPC requests. Batching JSON-RPC requests brings performance improvements, by reducing the network latency of performing several HTTP requests you would otherwise do.

The result of this operation is an array of responses, in the order that corresponds to each individual request from the batch.

If a particular request fails:

  • The batch request will return 200 OK HTTP status
  • The response object corresponding to the failing JSON-RPC call will be failing.

Request batching is supported over HTTPS only. There is no batching support over WSS currently.

-H "Content-Type: application/json" \
-d '[
  {"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []},
  {"jsonrpc": "2.0", "id": 2, "method": "eth_accounts", "params": []},
  {"jsonrpc": "2.0", "id": 3, "method": "tenderly_simulateTransaction", "params": []}

Limits and pricing

The total usage footprint of a batch is expressed in TU (Tenderly Units), and it's the sum of TU of all requests within the batch, according to the pricing.

The batch-request usage is subject to the monthly quota and rate limiting.