TriportRPC

eth_getBlockReceipts

POSThttps://api.triport.io/v1/ethereum

Returns the transaction receipts for every transaction in a single block, in one call.

Ethereumeth_read_rpcfree 10 RPS · basic 20 RPS · pro 100 RPS · business 250 RPS

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.

blockstringrequired
Block number as a 0x-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:

FieldTypeDescription
blockHashstringHash of the block this receipt belongs to.
blockNumberstringBlock number, hex-encoded.
transactionHashstringHash of the transaction.
transactionIndexstringIndex of the transaction within the block, hex-encoded.
fromstringSender address.
tostringRecipient address, or null for contract-creation transactions.
cumulativeGasUsedstringTotal gas used in the block up to and including this transaction, hex-encoded.
gasUsedstringGas used by this transaction alone, hex-encoded.
effectiveGasPricestringActual gas price paid per unit, hex-encoded (wei).
contractAddressstring | nullAddress of the created contract, or null if the transaction was not a contract creation.
logsarrayLog objects emitted by the transaction.
logsBloomstringBloom filter for quick log lookups.
statusstring0x1 on success, 0x0 if the transaction reverted.
typestringTransaction type (0x0 legacy, 0x1 access-list, 0x2 EIP-1559).

Errors

CodeMeaningWhen it happens
-32001trial_expiredThe account's trial period has ended.
-32003rate_limitedThe 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 at transactionIndex i in the block.
  • Prefer this over a fan-out of eth_getTransactionReceipt calls 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 returns null. 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_rpc category). Rate limiting is RPS-per-tier with burst; there is no daily quota. A -32003 rate_limited error means you should back off and retry shortly.
  • To list the transactions before fetching their receipts, see eth_getBlockByNumber.