Skip to main content

What is Batching?

Batching combines multiple RPC requests into a single HTTP call, reducing network overhead and improving performance when you need to make several related queries.

Benefits

  • Reduced Latency - Single round-trip instead of multiple
  • Fewer Connections - One HTTP request instead of many
  • Simpler Code - Handle related operations together

Request Format

Send an array of JSON-RPC request objects:

Response Format

Responses are returned as an array in the same order:

Limits

Important: Compute Units

Batching does not reduce Compute Unit (CU) consumption. Each request in the batch uses the same CUs as individual requests. Batching optimizes network efficiency, not billing.

Best Practices

  • Use unique id values to match responses
  • Handle partial failures (some requests may succeed while others fail)
  • Group related operations together
  • Keep batches under the 20 request limit