BNB Smart Chain

BNB Smart Chain

eth_getBlockReceipts

eth_getBlockReceipts hands back the receipt for every transaction in one BNB Smart Chain block from a single request. Each receipt carries status flags, gas used, effective gas price (in BNB), and the full event logs for that transaction. BSC is the BNB-fee EVM whose validators pack blocks roughly every three seconds, so a busy slot can hold hundreds of receipts. One bulk fetch beats firing a separate request per transaction. Aim the call at https://bsc.therpc.io/YOUR_API_KEY on chain ID 56 and the node streams the whole block's receipts as one array.

Use cases

  • Ingest every event emitted in a block in one round trip for a BSC log indexer.
  • Sum gas used and BNB fees across all transactions in a block for analytics or cost reporting.
  • Sweep all BEP-20 Transfer logs in the block to keep token balances current.
  • Flag transactions whose receipt status is "0x0" to surface reverts for error triage.

Parameters

#NameTypeRequiredDescription
1blockTagstringYesThe block whose receipts to fetch.

Response

TypeDescription
array of objectArray of receipt objects. Each receipt contains: transactionHash, transactionIndex, blockHash, blockNumber, from, to, contractAddress, gasUsed, cumulativeGasUsed, effectiveGasPrice, status ("0x1" success / "0x0" failure), logs, logsBloom, type.

Example request

curl https://bsc.therpc.io/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockReceipts",
"params": ["latest"],
"id": 1
}'

Try it live in the BNB Smart Chain playground.

Errors & troubleshooting

CodeMessageCause
-32602Invalid paramsBlock tag is unrecognised or malformed.
-32000Block not foundThe requested block does not exist or has been pruned.

Common pitfalls

  • For whole-block receipt ingestion this is far leaner than looping eth_getTransactionReceipt per transaction — make it your default for that job.
  • A block dense with PancakeSwap swaps and verbose logs produces a large payload, so stream or chunk the response rather than buffering it all in memory.
  • Older BSC nodes and some providers do not expose this method; verify it is available on your endpoint before depending on it in production.

Supported networks

  • Mainnet — Chain ID: 56
  • Testnet — Chain ID: 97

See also

Parameters

hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"

curl https://bsc.therpc.io/YOUR_API_KEY \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockReceipts","params":[""]}'

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.