Skip to main content

Parameters

object
Configuration object containing:
string
Commitment level (processed, confirmed, finalized)

Response

number
The current transaction count

Code Examples

Basic Request

Using web3.js

Notes

  1. Returns the current transaction count from the ledger
  2. The count includes all transactions processed by the node
  3. The response is immediate as it reads from the current state
  4. The count can change with new transactions
  5. The count may vary between nodes due to network propagation

Best Practices

  1. Use appropriate commitment level based on your needs
  2. Cache results when appropriate to reduce RPC load
  3. Monitor for changes in transaction count
  4. Consider using websocket subscription for real-time updates
  5. Handle network errors and retry when appropriate

Common Errors

Use Cases

  1. Transaction Count Analysis
  2. Transaction Count Monitoring
  3. Transaction Count Planning