RPC method

eth_getBlockByNumber on Polygon

Supported on SwiftNodes

Everything below was measured on 2026-10-13 by calling eth_getBlockByNumber on Polygon through the same endpoint customers use, and is re-measured weekly.

What eth_getBlockByNumber does

Returns a block by number or tag (latest, safe, finalized, pending, earliest): the header, and either the transaction hashes or the full transactions. Indexers, explorers and wallets use it to follow the chain.

eth_getBlockByNumber on Polygon: what we measured

Header fields20
Transactions per block76, 96, 86, 74, 95 in five consecutive blocks
Response size, full transactions (true)253.3 KB average
Response size, hashes only (false)6.7 KB
Gas limit160,000,000
Gas used in the latest block23,948,285 (15.0% of the limit)
Base fee248 gwei
Tag "safe"not served (safe block not found)
Tag "finalized"block 95,459,311
Tag "pending"block 95,459,316
Tag "earliest"block 0

What is different on Polygon

The header includes the fields added by London (EIP-1559 base fee), but not those of Shanghai (withdrawals), Cancun (EIP-4844 blob gas), Cancun (EIP-4788 beacon root), Prague (EIP-7685 requests). Code that assumes Ethereum's current header shape must treat the missing ones as optional.

Asking for full transactions (second parameter true) made the response 37.7 times larger than hashes only. If you need only some transactions, fetch hashes and request those transactions or their receipts individually.

The "safe" tag was not served on Polygon. Code that waits for "safe" needs a fallback, such as latest minus a confirmation count.

"finalized" was 3 blocks (about 5 s) behind the head.

A real Polygon block header

From block 95,459,310, as our endpoint returned it (long hex values shortened).

{
  "baseFeePerGas": "0x39bfac9d86",
  "difficulty": "0x1",
  "extraData": "0xd78301100883626f…(105 bytes)",
  "gasLimit": "0x9896800",
  "gasUsed": "0x16d6bfd",
  "hash": "0x098e3cf197520995c465edf637af99571e2d14bdb95e4baefc5fcdd1405eb36c",
  "logsBloom": "0x06e141ba42c07ec2…(256 bytes)",
  "miner": "0x0000000000000000000000000000000000000000",
  "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "nonce": "0x0000000000000000",
  "number": "0x5b097ee",
  "parentHash": "0x5369a4b364ea03aba2b20a4b52cd3eb552edd2858244224e19a4c469f5ab6d96",
  "receiptsRoot": "0x24922da64ba6759207c9e6049d9cefe7515507d7a4e3f4e104decb40245e59e0",
  "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  "size": "0xf929",
  "stateRoot": "0xa93c6e855d2e609918e588fb2a688e76b9cac2bedfc3e81ea2cb2c463a32ca4b",
  "timestamp": "0x6ace2303",
  "transactions": "76 transactions",
  "transactionsRoot": "0x3f849dd173703351322ca1ac2644427a8cc7aa65494936ab8bc54f0d145477a3",
  "uncles": []
}

Example request

curl -s https://rpc.swiftnodes.io/rpc/polygon?key=YOUR_API_KEY \
  -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["latest",false]}'
import { createPublicClient, http } from "viem";

const client = createPublicClient({
  transport: http("https://rpc.swiftnodes.io/rpc/polygon?key=YOUR_API_KEY"),
});

// Header plus transaction hashes (6.7 KB)
const block = await client.getBlock({ blockTag: "latest" });

// With full transactions (253.3 KB on average on Polygon)
const full = await client.getBlock({ blockNumber: block.number, includeTransactions: true });

// A block that will not be reorganised
const final = await client.getBlock({ blockTag: "finalized" });

Other methods on Polygon

eth_getBlockByNumber on other chains

Frequently asked questions

Does Polygon support eth_getBlockByNumber?

Yes. eth_getBlockByNumber answered on the SwiftNodes Polygon endpoint when our weekly probe called it through the customer path (2026-10-13).

How many transactions are in each Polygon block?

In five consecutive blocks on 2026-10-13: 76, 96, 86, 74, 95.

Polygon endpoints, live block height and WebSocket status are on the Polygon RPC page.

One key covers every chain we serve, and SwiftNodes has a free tier.