Skip to main content
POST
eth_blockNumber
curl --request POST \
  --url https://tempo-moderato.core.chainstack.com/a25a421add2280d53fdbc23417055501/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "params": [],
  "id": 1
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": "<string>"
}
Tempo API method that returns the latest block number of the blockchain. A block number is a hexadecimal number representing the block’s position in the blockchain.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Tempo produces blocks approximately every 0.5 seconds with sub-second finality using Simplex Consensus.

Parameters

  • none

Response

  • result — the integer value of the node’s latest block number encoded as hexadecimal.

eth_blockNumber code examples

const Web3 = require("web3");
const NODE_URL = "CHAINSTACK_NODE_URL";
const web3 = new Web3(NODE_URL);

async function getLatestBlockNumber() {
  const block = await web3.eth.getBlockNumber();
  console.log(`Latest block: ${block}`);
}

getLatestBlockNumber()

Use case

Tempo has sub-second block times (~0.5 seconds), making it ideal for applications that need to track real-time payment status. A DApp can use the current block number to determine when a payment transaction has been finalized.

Body

application/json
jsonrpc
string
default:2.0
method
string
default:eth_blockNumber
params
any[]
id
integer
default:1

Response

200 - application/json

The block number information

jsonrpc
string
id
integer
result
string

The latest block number encoded as hexadecimal

Last modified on January 23, 2026