transactionCount
The transactionCount query returns the total number of blockchain transactions that match specified filter criteria.
Schema Definition
transactionCount(
where: TransactionFilter
): UInt64!
Arguments
| Argument | Type | Description |
|---|---|---|
where | TransactionFilter input | Specifies 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 (
fromorto) 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:
fromandto. - Block range:
blockNumGteandblockNumLte. - Timestamp range:
timestampGteandtimestampLte. - Value range:
valueGteandvalueLte. - Gas filters:
gasPriceGte,gasPriceLte,gasUsedGteandgasUsedLte. - Method name:
method(specific contract function). - Event presence:
hasLogs(boolean to filter transactions with or without logs).