Skip to main content

transactionCount

The transactionCount query returns the total number of blockchain transactions that match specified filter criteria.

Schema Definition

transactionCount(
where: TransactionFilter
): UInt64!

Arguments

ArgumentTypeDescription
whereTransactionFilter inputSpecifies subsets of transaction data to be retrieved.

Return Type

UInt64 scalar

Common Use Cases

  • Track overall network usage and transaction volume over time to identify trends, peak usage periods, and network growth patterns.
  • Determine transaction activity for specific addresses (from or to) to analyze wallet activity, identify active users, or flag suspicious behavior.
  • Count transactions involving specific smart contracts to measure contract popularity, usage frequency, and adoption rates.
  • Generate transaction volume reports for specific time periods using timestamp filters to create daily, weekly, or monthly activity summaries.
  • Filter by gas price ranges or gas usage thresholds to analyze network congestion periods and user behavior during different fee environments.

Example

Query

Count USDT Transactions Since a Specific Timestamp

query CountUSDTTransactions($where: TransactionFilter) {
transactionCount(where: $where)
}

Variables

{
"where": {
"to": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"timestampGte": 1759813200
}
}

Response

{
"data": {
"transactionCount": 1306026
}
}

Implementation Notes

note

The where parameter accepts a TransactionFilter input with multiple filter options including:

  • Address filters: from and to.
  • Block range: blockNumGte and blockNumLte.
  • Timestamp range: timestampGte and timestampLte.
  • Value range: valueGte and valueLte.
  • Gas filters: gasPriceGte, gasPriceLte, gasUsedGte and gasUsedLte.
  • Method name: method (specific contract function).
  • Event presence: hasLogs (boolean to filter transactions with or without logs).