Skip to main content
Blocks can’t be filtered (beyond the range). Whether you get them depends on what else you ask for.

Every block in a range

Select block fields and send no logs or transactions filter:
100 rows, one per block.

Only blocks that contain a match

Select block fields and filter logs or transactions. The blocks stream then holds only the blocks with at least one matched log or matched transaction (the union of both):
This is the cheapest way to get timestamps for your matches when you need more than the log’s own blockTimestamp: one block row per block with a match, not one per log.
If all you need is the timestamp of each log, select blockTimestamp on the log instead of requesting a blocks stream.

Sampling: every n-th block

blockInterval keeps only the blocks whose number is ≡ blockOffset (mod blockInterval):
Returns blocks 19426003, 19426028, 19426053 and 19426078.
  • It applies only to the blocks stream, after the rules above. Logs and transactions are not sampled.
  • It needs block fields selected (400 otherwise).
  • blockOffset must be smaller than blockInterval.
See Sampling blocks for time series like “base fee every hour”.