Docs

starknet_blockHashAndNumber - Get the most...

Get the most recent accepted block hash and number

Get the most recent accepted block hash and number

Request Parameters

Request

This method accepts no parameters.

Response Body

Response
resultOBJECT

The latest block hash and number Object with latest block hash and number

Errors

CodeMessage
32There are no blocks

Examples

Bash
curl -X POST https://api-starknet-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "starknet_blockHashAndNumber",
    "params": [],
    "id": 1
  }'

On this page