eth_getBlockReceipts
https://api.triport.io/v1/ethereumReturns the transaction receipts for every transaction in a single block, in one call.
eth_getBlockReceipts returns an array containing the receipt of every
transaction in the specified block. It accepts a single block identifier — a
named tag (latest, safe, finalized, earliest, pending) or a
0x-prefixed hex block number — and returns one receipt object per transaction,
in the order the transactions appear in the block.
Use this method whenever you need the receipts for a whole block. Fetching them
this way is far more efficient than calling
eth_getTransactionReceipt once per
transaction: a busy block can hold hundreds of transactions, and a single
eth_getBlockReceipts call replaces all of those round-trips with one request.
This makes it the preferred building block for indexers, log scanners, and
anything that reconciles on-chain state block by block.
If the block has no transactions the result is an empty array ([]); if the
block does not exist the result is null.
Parameters
A single positional parameter — the block identifier.
blockstringrequired0x-prefixed hex string (e.g. 0x149e2c1), or one of the tags latest, safe, finalized, earliest, pending.Response
Response fields
result is an array of receipt objects (or null if the block is not found).
Each receipt contains:
| Field | Type | Description |
|---|---|---|
blockHash | string | Hash of the block this receipt belongs to. |
blockNumber | string | Block number, hex-encoded. |
transactionHash | string | Hash of the transaction. |
transactionIndex | string | Index of the transaction within the block, hex-encoded. |
from | string | Sender address. |
to | string | Recipient address, or null for contract-creation transactions. |
cumulativeGasUsed | string | Total gas used in the block up to and including this transaction, hex-encoded. |
gasUsed | string | Gas used by this transaction alone, hex-encoded. |
effectiveGasPrice | string | Actual gas price paid per unit, hex-encoded (wei). |
contractAddress | string | null | Address of the created contract, or null if the transaction was not a contract creation. |
logs | array | Log objects emitted by the transaction. |
logsBloom | string | Bloom filter for quick log lookups. |
status | string | 0x1 on success, 0x0 if the transaction reverted. |
type | string | Transaction type (0x0 legacy, 0x1 access-list, 0x2 EIP-1559). |
Errors
| Code | Meaning | When it happens |
|---|---|---|
-32001 | trial_expired | The account's trial period has ended. |
-32003 | rate_limited | The per-tier RPS limit was exceeded. Back off and retry. |
See errors.md for the full error envelope and handling guidance.
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/v1/ethereum", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "eth_getBlockReceipts",
params: ["latest"],
}),
});
const { result } = await res.json();
console.log(`${result.length} receipts in the latest block`);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
const receipts = await client.ethereum.request<any[]>(
"eth_getBlockReceipts",
["0x149e2c1"],
);
console.log(`${receipts.length} receipts`);Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
receipts = client.ethereum.request("eth_getBlockReceipts", ["0x149e2c1"])
print(f"{len(receipts)} receipts")Notes
- The result preserves transaction order, so
result[i]corresponds to the transaction attransactionIndexiin the block. - Prefer this over a fan-out of
eth_getTransactionReceiptcalls when you need a whole block — it is one request instead of N and counts as a single hit against your RPS budget. - An empty block returns
[]; a non-existent block returnsnull. Always null-check before iterating. - All numeric fields are
0x-prefixed hex strings — convert with base 16 before arithmetic. - Available on the free tier (
eth_read_rpccategory). Rate limiting is RPS-per-tier with burst; there is no daily quota. A-32003 rate_limitederror means you should back off and retry shortly. - To list the transactions before fetching their receipts, see
eth_getBlockByNumber.