Docs
Docs
Home
Getting Started
Agent Tooling
CLI
Supported Chains
Acala
Aptos
Arbitrum
Arc
Asset Hub
Astar
Avalanche
Base
Berachain
Bifrost
Binance Smart Chain
Bittensor
Blast
Boba Network
Bridge Hub
Celo
Centrifuge
Chiliz
Cronos
Enjin
Ethereum
Etherlink
Flow EVM Gateway
Gnosis
Hydration
Hyperliquid
Immutable
Ink
IoTeX
Kusama
Linea
LISK
Manta Atlantic
Manta Pacific
Mantle
MegaETH
Monad
Movement
Neuroweb
opBNB
Optimism
Plasma
Polkadot
Polygon
Pulsechain
Robinhood
Ronin
Scroll
Sonic
Starknet
Taiko
Tempo
Sui
TRON
Unichain
Viction
World Chain
XDC Network
XX Network
Zetachain
zkSync Era
Zora
Supported ChainsStarknetJSON-RPC API

starknet_getBlockTransactionCount - Get Block Transaction Count

Get the number of transactions in a Starknet block by block ID. Useful for block analysis, throughput monitoring, and indexing pipelines.

Starknet RPC endpoint: endpoint URLs, plans and pricing.

Returns the number of transactions in a specific Starknet block. The block can be identified by hash, number, or the "latest" / "pending" tags.

Overview

This method provides a lightweight way to query block activity without fetching full block data. It is commonly used in monitoring dashboards, indexing pipelines, and throughput analysis tools. Starknet processes batches of transactions into blocks that are then proven and submitted to Ethereum L1, so transaction count per block is a useful metric for understanding network load.

Starknet blocks can contain various transaction types including INVOKE, DECLARE, DEPLOY_ACCOUNT, and L1_HANDLER transactions. This method counts all transaction types in the block.

JSON-RPC request
{
  "jsonrpc": "2.0",
  "method": "starknet_getBlockTransactionCount",
  "params": [
    {
      "block_number": 800000
    }
  ],
  "id": 1
}

Errors

CodeMessageDescription
24Block not foundThe specified block hash or number does not exist

Examples

Use Cases

  • Throughput Monitoring - Track Starknet network activity and transaction volume over time
  • Block Explorer - Display transaction counts in block list views without fetching full block data
  • Indexing Pipelines - Pre-allocate resources or decide batch sizes based on block transaction counts
  • Network Health - Detect anomalous blocks (empty or unusually large) for alerting
  • Analytics Dashboards - Calculate average transactions per block for network performance metrics

Related Methods

  • starknet_getBlockWithTxs - Get block with full transaction objects
  • starknet_getBlockWithTxHashes - Get block with transaction hashes only
  • starknet_blockNumber - Get the latest block number
  • starknet_getBlockWithReceipts - Get block with transaction receipts
  • starknet_blockHashAndNumber - Get latest block hash and number

starknet_estimateMessageFee - Estimate L1-to-L2 Message Fee

Estimate the L2 fee for processing a message sent from Ethereum L1 to Starknet L2. Essential for cross-layer communication and bridge integrations.

starknet_getBlockWithReceipts - Get block I...

Get block information with full transactions and receipts given the block id

On this page

OverviewErrorsExamplesUse CasesRelated Methods