Block receipts (one block, summarised)
POST /api/block-receiptsEvery transaction receipt in one block, fetched as a single upstream read and summarised: tx count, succeeded vs failed, total gas used, total fees, log count, contract creations, tx-type mix - plus compact per-transaction rows (hash, from, to, status, gas used, effective gas price, fee, log count) capped at 300. Send POST /api/block-receipts with the required field block and pay $0.005 per call over x402 or MPP (there is no free tier). It returns a JSON object with network, chainId, block, blockHash, summary and 4 more.
Block analytics, failed-tx hunting, or 'who paid what in block N' without N separate receipt calls.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
block | string | yes | Block number (decimal or 0x hex) or latest. |
limit | number | no | Per-transaction rows to return, 0-300 (default 100). The summary always covers the whole block. |
network | string | no | ethereum / base / polygon / arbitrum / optimism (default ethereum). |
Example request
curl -i -X POST https://agent402.tools/api/block-receipts \
-H "Content-Type: application/json" \
-d '{"block":"25563191","network":"ethereum","limit":5}'
Without payment this returns HTTP 402 Payment Required with the exact price for block-receipts; any x402 v2 or MPP client pays it and retries.
Example response
{
"network": "ethereum",
"chainId": 1,
"block": 25563191,
"blockHash": "0x8e12…1243",
"summary": {
"txCount": 149,
"succeeded": 143,
"failed": 6,
"gasUsed": "16506190",
"feeWei": "4453605500724532",
"feeNative": "0.004453605500724532",
"logCount": 420,
"contractCreations": 0,
"types": {
"0x2": 126,
"0x0": 16,
"0x4": 6,
"0x3": 1
}
},
"returned": 5,
"receipts": [
{
"hash": "0xdcae…9cd6",
"index": 0,
"status": "success",
"from": "0xb01c…9c2e",
"to": "0x7c46…0f54",
"contractAddress": null,
"type": "0x2",
"gasUsed": "21000",
"effectiveGasPriceGwei": 1.040610226,
"feeWei": "21852814746000",
"logCount": 0
}
],
"source": "alchemy",
"fetchedAt": "2026-08-22T12:00:00.000Z"
}
| Field | Type | Always present | In the example |
|---|---|---|---|
network | string | yes | ethereum |
chainId | number | yes | 1 |
block | number | yes | 25563191 |
blockHash | string | yes | 0x8e12…1243 |
summary | object | yes | 9 fields: txCount, succeeded, failed, gasUsed, feeWei, feeNative |
returned | number | yes | 5 |
receipts | array of objects | yes | 1 item in the example |
source | string | yes | alchemy |
fetchedAt | string | yes | 2026-08-22T12:00:00.000Z |
From an MCP client
catalog.call {
"slug": "block-receipts",
"params": {
"block": "25563191",
"network": "ethereum",
"limit": 5
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for block-receipts; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
blockis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key (
Authorization: Bearer a402_...) also pays it. - A
GETorHEADto /api/block-receipts returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/block-receipts", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"block": "25563191",
"network": "ethereum",
"limit": 5
}),
});
Related tools
Transaction receipt (decoded transfers)
POST /api/tx-receiptFull receipt for a transaction hash in one call: status, block, from/to, value, gas used vs limit, effective gas price, …
Wallet token transfers (filtered)
POST /api/asset-transfersRecent token transfers for a wallet on Base, Ethereum and other EVM chains, newest first. Filtered transfer log for an E…
Block info
GET /api/block-infoHeader-level detail for one block on Ethereum, Base, Polygon, Arbitrum, or Optimism: hash, timestamp (unix + ISO), trans…
Chain info snapshot
GET /api/chain-infoOne-call chain state snapshot: chain id, latest block number, and current gas price (wei + gwei) for Ethereum, Base, Pol…
Multi-chain EVM RPC (read-only)
POST /api/evm-rpcRead-only JSON-RPC against Ethereum, Base, Polygon, Arbitrum, or Optimism with built-in multi-endpoint failover - one pa…
Token balances (named contracts)
POST /api/token-balancesERC-20 balances of one wallet for a NAMED list of token contracts (1-20) - the targeted complement to the full-portfolio…