---
title: "Freshness and lag per dataset"
method: GET
path: "/{chain}/status/freshness"
tags: ["Status"]
---

# Freshness and lag per dataset

`GET /{chain}/status/freshness`

## Request

- Base URL: `https://api.blockvectra.com/v1/data`
- URL: `https://api.blockvectra.com/v1/data/{chain}/status/freshness`
- Auth: API key in header `x-api-key`

Latest indexed block/day for each public dataset and how far it lags the chain head. Values may be up to 5 s old. If the current answer is unavailable (`503`) but the previous successful answer is at most 60 s old, that answer is returned as `200` with `meta.stale = true` and `meta.stale_age_seconds` (how long ago it was queried); `checked_at` and `meta.refreshed_at` keep the real check time. Without such an answer it is `503`. A chain with no indexed block yet answers `409 not_indexed_yet` (no `indexed_through`) instead.

## Path parameters

- `chain` string, required

## Response `200`

One row per tracked dataset.

- FreshnessEnvelope: `next_cursor` is never present (this endpoint has no pagination).
  - `data` FreshnessRow[], required
    - `dataset` 'blocks' | 'transactions' | 'logs' | 'traces' | 'erc20_transfers' | 'erc721_transfers' | 'erc1155_transfers' | 'token_balances' | 'erc1155_balances' | 'tokens' | 'nft_owners' | 'dex_swaps' | 'dex_prices' | 'stocks' | 'stock_daily', required: Public dataset identifier.
    - `category` 'raw' | 'derived', required: Dataset category classification (`raw` for core chain data, `derived` for computed datasets).
    - `max_block_number` integer, nullable, required
    - `max_day` string, date, required: `YYYY-MM-DD`, UTC calendar day.
    - `max_time` string, date-time, required: `YYYY-MM-DDTHH:MM:SSZ`, UTC, second precision.
    - `seconds_behind` integer, nullable, required
    - `blocks_behind` integer, nullable, required: Head of `blocks` minus `max_block_number`. Always `null` for `dataset = "blocks"` (it is the head itself; this is not the node lag).
    - `days_behind` integer, nullable, required
    - `coverage_from_block` integer, nullable: Lowest block number indexed with traces. Present only when `dataset = "traces"`.
    - `coverage_to_block` integer, nullable: Highest block number indexed with traces. Present only when `dataset = "traces"`.
    - `coverage_complete` boolean: Whether trace coverage between `coverage_from_block` and `coverage_to_block` is complete. Present only when `dataset = "traces"`.
    - `checked_at` string, date-time, required: `YYYY-MM-DDTHH:MM:SSZ`, UTC, second precision.
  - `meta` object, required: Metadata present on every success response.
    - `chain` string, required: Chain identifier; the value of the `{chain}` path parameter.
    - `chain_slug` string, required: Canonical uppercase chain slug; `chain` is always its lowercase form.
    - `chain_external_id` string, required: CAIP-2 formatted external chain identifier (`eip155:{chain_id}`).
    - `as_of_block` integer, required: The newest fully written block (the `blocks` table's maximum height); the only serving bound for block-scoped endpoints. For snapshot endpoints (balances, holders, nfts, dex prices, stocks) it is the service's current indexed head, not the block height of the snapshot: read the snapshot time from `meta.refreshed_at`, and treat the data as stale when `refreshed_at` is `null`.
    - `safe_block` integer, nullable, required: A marker only: the node's consensus `safe` block. Always present; `null` while no value is known (the node has no such tag, or the indexer has not read one yet). Only grows, never below `finalized_block`, and may be above or below `as_of_block`. It never truncates, rejects or bounds a response; see Finality in the API description.
    - `finalized_block` integer, nullable, required: A marker only: the node's consensus `finalized` block. Always present; `null` while no value is known (the node has no such tag, or the indexer has not read one yet). Only grows, and may be above or below `as_of_block`. It never truncates, rejects or bounds a response; see Finality in the API description.
    - `coverage` 'full' | 'partial', required: `"partial"` appears only from `GET /{chain}/addresses/{address}/transactions` and `GET /{chain}/addresses/{address}/transfers`, when `clamp=true` narrowed the served window, and from those two, `GET /{chain}/tokens/{token}/transfers` and `GET /{chain}/dex/swaps` when the block window starts before the lower bound of the dataset the endpoint reads -- the chain's first indexed block, or higher while that dataset is still being backfilled (see Coverage in the API description and each endpoint's window description). Every other endpoint reports `"full"`.
    - `refreshed_at` string, date-time, required: `YYYY-MM-DDTHH:MM:SSZ`, UTC, second precision.
    - `stale` true: Present (always `true`) only when this is the previous successful answer served because the refresh failed; absent on a freshly queried answer.
    - `stale_age_seconds` integer: Present with `stale`; seconds since this answer was queried (at most 60).

## Other responses

- `401`: HTTP 401: a missing API key returns missing_api_key; an unknown, disabled, or revoked key returns the same invalid_api_key error envelope. error.code and error.data.reason contain the reason. Rejected requests are not billed.
- `402`: Payment required: the paid balance or the free grant is exhausted. The response body is `{"error":{"code":"insufficient_balance"}}`. Rejected requests are not billed.
- `404`: `error.code = "not_found"`: the target object was not found, or `{chain}` is not a registered or public chain (returns HTTP 404 with `error.code = "not_found"`, not billed).
- `409`: `error.code = "not_indexed_yet"` without `indexed_through`: the chain has no indexed block at all yet (`GET /chains` `coverage.has_data = false`), so there is no head and no lag to report. Never a `200` with invented values.
- `422`: `error.code = "no_coverage"`: no data here, which is permanent except while a dataset is being backfilled (a windowed endpoint's lower bound can move down as the backfill proceeds, so retry later). Either the chain does not have this endpoint's capability, or the requested block (or whole block window) is before the chain's first covered block (`coverage.from_block`) -- for the windowed endpoints, the lower bound of the dataset they read, which is that block or higher while the dataset is still being backfilled -- or the capability needs history from genesis (`balances`, `holders`, `nfts`) and `coverage.from_block` is not `0` yet or the indexed blocks have holes, or (traces) the block falls in a permanent trace coverage gap. A block window entirely before the lower bound is reported as this `422` even when its `to_block` is also above `as_of_block`. See Coverage in the API description (the history start in examples is a placeholder; read `GET /chains` `coverage.from_block` at runtime).
- `429`: Rate limited. `{"error":{"code":"rate_limited"}}` when the key CU rate limit is exceeded (the response includes `Retry-After`) or the account call rate limit is exceeded (no `Retry-After`). `{"error":{"code":"cost_exceeds_burst"}}` when a single request exceeds the key burst capacity; split the request, retrying as sent never succeeds. Rejected requests are not billed.
- `503`: `error.code = "unavailable"`: the service is temporarily unavailable, timed out, busy on this chain (no query slot freed up in time, see `limits.max_concurrent_queries` in `GET /chains`), or shutting down (see "Errors" above). Always carries an HTTP `Retry-After` header (seconds); wait at least that long before retrying.

---

[API](https://skmtc.dev/blockvectra/apis/blockvectra-data-api.md) · [All operations](https://skmtc.dev/blockvectra/apis/blockvectra-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/blockvectra/apis/blockvectra-data-api/revisions/c5b949e955b5?raw)
