Skip to main content
POST
https://api.blockdb.io
/
v1
/
evm
/
raw
/
blocks
/
summary
curl -X POST "https://api.blockdb.io/v1/evm/raw/blocks/summary" \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "chain_id": 1,
  "from_block": 18900000,
  "to_block": 18900999,
  "from_timestamp": null,
  "to_timestamp": null,
  "include_fee_histogram": true,
  "bucket_granularity": "hour"
}'
{
  "chain_id": 1,
  "meta": {
    "request_window": {
      "from_block": 18900000,
      "to_block": 18900999,
      "from_timestamp": null,
      "to_timestamp": null
    },
    "filters": {
      "include_fee_histogram": true,
      "bucket_granularity": "hour"
    }
  },
  "data": [
    {
      "bucket_start": "2025-11-11T00:00:00Z",
      "bucket_end": "2025-11-11T00:59:59Z",
      "bucket_granularity": "hour",
      "block_count": 300,
      "min_block_number": 18900000,
      "max_block_number": 18900299,
      "tx_count": 420000,
      "successful_tx_count": 405000,
      "failed_tx_count": 15000,
      "unique_senders": 128456,
      "unique_recipients": 98234,
      "gas_used": "9203456789000",
      "gas_limit": "9300000000000",
      "base_fee_per_gas_min": "2100000000",
      "base_fee_per_gas_max": "2300000000",
      "base_fee_per_gas_avg": "2195000000",
      "priority_fee_per_gas_avg": "1500000000",
      "burned_fees": "1932000000000000000",
      "net_issuance": "-1300000000000000000",
      "fee_histogram": [
        {
          "bucket_index": 0,
          "max_effective_gas_price": "500000000",
          "tx_count": 42000
        }
      ]
    }
  ],
  "cursor": null,
  "count": 1
}

Description

Returns aggregated block statistics for a bounded range. Use this endpoint when you need coarse metrics (gas usage, transaction throughput, fee trends) without scanning every block or transaction record.

Parameters

chain_id
number
required
Target EVM network. See the Chain enumeration for supported values.

Range Filters (mutually exclusive)

from_block
number
Starting block number (inclusive) for the query. Use with to_block.
to_block
number
Ending block number (inclusive) for the query. Use with from_block.
from_timestamp
string
Starting timestamp (ISO-8601). If it falls between blocks, the next block after this timestamp is used. Use with to_timestamp.
to_timestamp
string
Ending timestamp (ISO-8601). If it falls between blocks, the last block before this timestamp is used. Use with from_timestamp.
Validation rule:
You must provide either a block range or a time range.
Providing both results in HTTP 400.
Providing neither results in HTTP 400.

Aggregation Controls

include_fee_histogram
boolean
default:"false"
Adds a 10-bucket histogram for effective gas price distribution when true.
bucket_granularity
string
default:"total"
Temporal grouping of the summary. Supported values: "total", "hour", "day".

Pagination Controls

limit
number
default:"250"
Recommended default 250; maximum 1000 to stay under ~10 MB responses.
cursor
string
Pagination cursor from a prior call.

Response Fields

chain_id
number
EVM chain ID echoed at the response root.

Meta

meta
object
Echo of request metadata applied to the response.
meta.request_window
object
Block/timestamp bounds derived from the request.
meta.filters
object
Other request knobs echoed back (fee histogram flag, bucket granularity).

Data

data
object[]
Buckets summarising the requested range. One element when bucket_granularity is "total".
data.bucket_start
string
ISO-8601 timestamp marking the start of the aggregation window.
data.bucket_end
string
ISO-8601 timestamp marking the end of the aggregation window.
data.bucket_granularity
string
Granularity echoed from the request.
data.block_count
number
Total number of canonical blocks in the bucket.
data.min_block_number
number
Smallest block number covered in the bucket.
data.max_block_number
number
Largest block number covered in the bucket.
data.tx_count
number
Total transactions in the bucket.
data.successful_tx_count
number
Successful transactions in the bucket.
data.failed_tx_count
number
Failed transactions in the bucket.
data.unique_senders
number
Distinct sender addresses observed.
data.unique_recipients
number
Distinct recipient addresses observed.
data.gas_used
string
Sum of gas used (wei) across all blocks in the bucket.
data.gas_limit
string
Sum of gas limits (wei) across all blocks in the bucket.
data.base_fee_per_gas_min
string
Minimum base fee per gas (wei).
data.base_fee_per_gas_max
string
Maximum base fee per gas (wei).
data.base_fee_per_gas_avg
string
Average base fee per gas (wei).
data.priority_fee_per_gas_avg
string
Average priority fee per gas (wei) for successful transactions. Nullable on unsupported chains.
data.burned_fees
string
Total ETH burned via base fee (wei).
data.net_issuance
string
Protocol-level issuance minus burned fees for the bucket (wei).
data.fee_histogram
object[]
Ten buckets covering the 0-100 percentile range when include_fee_histogram is true.
data.fee_histogram[].bucket_index
number
Zero-based bucket index (0-9).
data.fee_histogram[].max_effective_gas_price
string
Upper bound (exclusive) of the fee bucket (wei).
data.fee_histogram[].tx_count
number
Transactions in the fee bucket.

Envelope Fields

cursor
string | null
Pagination cursor for additional buckets when the range exceeds service limits.
count
number
Number of bucket elements in data.

Use Cases

  • Feed dashboards with pre-aggregated throughput metrics without ETL.
  • Detect fee regime shifts by polling hourly buckets.
  • Estimate unique user counts per epoch to complement raw transaction exports.
curl -X POST "https://api.blockdb.io/v1/evm/raw/blocks/summary" \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "chain_id": 1,
  "from_block": 18900000,
  "to_block": 18900999,
  "from_timestamp": null,
  "to_timestamp": null,
  "include_fee_histogram": true,
  "bucket_granularity": "hour"
}'
{
  "chain_id": 1,
  "meta": {
    "request_window": {
      "from_block": 18900000,
      "to_block": 18900999,
      "from_timestamp": null,
      "to_timestamp": null
    },
    "filters": {
      "include_fee_histogram": true,
      "bucket_granularity": "hour"
    }
  },
  "data": [
    {
      "bucket_start": "2025-11-11T00:00:00Z",
      "bucket_end": "2025-11-11T00:59:59Z",
      "bucket_granularity": "hour",
      "block_count": 300,
      "min_block_number": 18900000,
      "max_block_number": 18900299,
      "tx_count": 420000,
      "successful_tx_count": 405000,
      "failed_tx_count": 15000,
      "unique_senders": 128456,
      "unique_recipients": 98234,
      "gas_used": "9203456789000",
      "gas_limit": "9300000000000",
      "base_fee_per_gas_min": "2100000000",
      "base_fee_per_gas_max": "2300000000",
      "base_fee_per_gas_avg": "2195000000",
      "priority_fee_per_gas_avg": "1500000000",
      "burned_fees": "1932000000000000000",
      "net_issuance": "-1300000000000000000",
      "fee_histogram": [
        {
          "bucket_index": 0,
          "max_effective_gas_price": "500000000",
          "tx_count": 42000
        }
      ]
    }
  ],
  "cursor": null,
  "count": 1
}