🐹
ChainRPC
  • Welcome to Chain-RPC Docs
  • Getting started
  • Networks
    • Ethereum
      • Concepts
        • Transaction types
        • Filters and subscriptions
      • How to
        • Authenticate requests
        • Make requests
        • Make batch requests
        • Choose a network
        • Subscribe to events
        • Interact with ERC-20 tokens
        • Add a network add-on
        • Secure a project
          • API key
          • API key secret
          • JWTs
          • Rate limits
          • Allowlists
        • Avoid rate limiting
      • JSON-RPC methods
        • eth_accounts
        • eth_blockNumber
        • eth_call
        • eth_chainId
        • eth_coinbase
        • eth_estimateGas
        • eth_feeHistory
        • eth_getBalance
        • eth_gasPrice
        • eth_getBlockByHash
        • eth_getBlockByNumber
        • eth_getBlockTransactionCountByHash
        • eth_getBlockTransactionCountByNumber
        • eth_getCode
        • eth_getLogs
        • eth_getStorageAt
        • eth_getTransactionByBlockHashAndIndex
        • eth_getTransactionByBlockNumberAndIndex
        • eth_getTransactionByHash
        • eth_getTransactionCount
        • eth_getTransactionReceipt
        • eth_getUncleByBlockHashAndIndex
        • eth_getUncleByBlockNumberAndIndex
        • eth_getUncleCountByBlockHash
        • eth_getUncleCountByBlockNumber
        • eth_getWork
        • eth_mining
        • eth_hashrate
        • eth_protocolVersion
        • eth_sendRawTransaction
        • eth_sendTransaction
        • eth_sign
        • eth_submitWork
        • eth_syncing
        • net_listening
        • net_peerCount
        • net_version
        • web3_clientVersion
        • Filter methods
          • eth_newFilter
          • eth_newBlockFilter
          • eth_newPendingTransactionFilter
          • eth_getFilterLogs
          • eth_getFilterChanges
          • eth_uninstallFilter
        • Subscription methods
          • eth_subscribe
          • eth_unsubscribe
    • Arbitrum
      • How to
        • Authenticate requests
        • Make requests
        • Choose a network
        • Secure a project
        • Get testnet ETH
      • JSON-RPC API methods
    • Aurora
      • How to
      • JSON-RPC API methods
    • Avalanche (C-Chain)
      • How to
      • JSON-RPC API methods
    • BNB Chain
      • How to
      • JSON-RPC API methods
    • Celo
      • How to
      • JSON-RPC API methods
    • Cube
      • How to
      • JSON-RPC API methods
    • Fantom
      • How to
      • JSON-RPC API methods
    • Gnosis
      • How to
      • JSON-RPC API methods
    • Heco
      • How to
      • JSON-RPC API methods
    • Klaytn
      • How to
      • JSON-RPC API methods
    • Optimism
      • How to
      • JSON-RPC API methods
    • OEC Chain
      • How to
      • JSON-RPC API methods
    • Polygon PoS
      • How to
      • JSON-RPC API methods
  • Custom APIs
    • Wellat SDK
    • DeX SDK
    • NFT SDK
Powered by GitBook
On this page
  1. Networks
  2. Ethereum
  3. How to

Make batch requests

PreviousMake requestsNextChoose a network

Last updated 2 years ago

Multiple requests can be sent at the same time in an array, this is called a request, and conforms to the . Batch is also commonly referred to as "multi-call".

All requests within the array are counted as individual requests against the daily request limit and batch itself is counted as a request. For example, if the array of request contains 30 requests, then those 30 requests count against the daily request limit, as well as the batch of requests, so this would be 31 total requests.

Each request contained within the array is processed before all the requests are returned. Therefore, when requests are sent in a batch, they will be returned only after every request is processed.

Example batch request (containing 30 requests plus the batch request itself):

curl --request POST \
  --url https://eth.chainrpc.io/v3/<API-KEY> \
  --header 'Content-Type: application/json' \
  --data '[
	{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 2, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 3, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 4, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 5, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 6, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 7, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 8, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 9, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 10, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 11, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 12, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 13, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 14, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 15, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 16, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 17, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 18, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 19, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 20, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 21, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 22, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 23, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 24, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 25, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 26, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 27, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 28, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 29, "method": "eth_blockNumber", "params": []},
	{"jsonrpc": "2.0", "id": 30, "method": "eth_accounts", "params": []}
]'
batch
JSON-RPC 2.0 specification