getTransactionCount
The getTransactionCount method returns the current transaction count from the ledger. This represents the total number of transactions that have been successfully processed by the network since genesis, serving as a global counter of blockchain activity.
The transaction count provides a simple metric for understanding the total throughput and activity level of the Solana blockchain. Each successfully processed transaction increments this counter by one, creating a monotonically increasing value that represents the cumulative transaction volume. This metric is useful for tracking network usage trends, calculating average transaction rates, and monitoring overall blockchain activity.
This method is valuable for analytics dashboards displaying network statistics, monitoring tools tracking throughput trends, research applications analyzing blockchain growth, and applications that need a global activity metric. While less commonly used than methods like getSlot or getBlockHeight, it provides unique insights into the total transaction volume processed by the network.
Parameters
parameter | type | description |
|---|---|---|
config | object | Optional configuration object |
config.commitment | string | Level of commitment: 'processed', 'confirmed', or 'finalized' (default: 'finalized') |
config.minContextSlot | number | Optional. Minimum slot that the request can be evaluated at |
Return Object
field | type | description |
|---|---|---|
result | number | Total number of transactions processed since genesis (u64) |
Request Example
Response Example
Tip: This count only includes successfully processed transactions, not failed ones. Use different commitment levels to see transaction counts at different finality stages. Combine with time-based queries to calculate transactions per second (TPS) over specific periods. The count grows continuously as new transactions are processed.