Learn getTransactionCount use cases, code examples, request parameters, response structure, and tips.
getTransactionCount
RPC method returns the current total number of transactions processed by the Solana ledger since genesis, at a specified commitment level.
options
(object, optional): An optional configuration object that can include:
commitment
(string, optional): Specifies the commitment level for the query (e.g., "finalized"
, "confirmed"
, "processed"
). If not provided, the node’s default commitment is used.minContextSlot
(u64, optional): The minimum slot that the request can be evaluated at.result
field in the JSON-RPC response is a single u64
number representing the total transaction count from the ledger up to the slot determined by the commitment level.
Example Response:
commitment
level. A processed
commitment will likely yield a higher, more up-to-the-second count than finalized
, but finalized
offers a guarantee against rollbacks.getTransactionCount
RPC method to retrieve the total number of transactions on the Solana network.