> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Tell a data gap from a request problem

> Decide whether missing 0xArchive rows are a real data gap or a request problem: coverage starts, plan windows, finalization, coverage gaps, and incidents.

Decide whether rows are missing because of the request or because the data has a gap, before you retry, widen, or report anything. A window outside coverage, a plan limit, a finalization clamp, an unfinished cursor, or the wrong market namespace each returns fewer rows with no gap in the data. Rule those out first, then ask the data-quality routes whether the window has a recorded gap or an incident.

## Symptoms

* A window returns fewer rows than you expect, or an empty `data` array.
* A chart or backtest shows a flat stretch or a jump.
* A replay sends `gap_detected`.

## Rule out the request first

Each of these explains missing rows without any gap in the data:

| Check | What it means |
| - | - |
| Empty `data` with `meta.coverage_from` | The window ends before this symbol's coverage starts. Start at `coverage_from` |
| `400` `range_before_coverage` | The range ends before the data type's first served time. Use `available_from` from [capabilities](https://docs.0xarchive.io/capabilities.md) |
| `403` `historical_depth_exceeded` or `historical_range_exceeded` | The window is outside your plan's history window or span |
| `meta.clamped_to` present | Lighter trade history stops at `meta.finalized_through`; newer rows are on `/recent` |
| `meta.has_more` is `true` | The window is not finished. Follow `meta.next_cursor` |
| `400` `invalid_symbol` or `404` `unsupported_for_venue` | The symbol or data type belongs to another venue family, such as a HIP-3 symbol without its builder prefix |
| `429` or exhausted credits | A capacity limit, not a data gap. Follow [When you reach a limit](https://docs.0xarchive.io/rate-limits.md#when-you-reach-a-limit) |

[Troubleshoot missing history and history limits](https://docs.0xarchive.io/troubleshooting/history-limits.md) and [Troubleshoot pagination](https://docs.0xarchive.io/troubleshooting/pagination.md) cover these in detail.

## Check coverage for the same window

When the request is right, ask the coverage route about the exact bounds the job used. This example checks Hyperliquid BTC for the 24 hours that ended one hour ago:

```bash theme={"theme":"github-dark"}
END=$(( ($(date +%s) - 3600) * 1000 ))   # one hour ago, in Unix milliseconds
START=$(( END - 24 * 3600 * 1000 ))      # 24 hours earlier

curl -sS "https://api.0xarchive.io/v1/data-quality/coverage/hyperliquid/BTC?from=$START&to=$END" \
  -H "X-API-Key: $OXARCHIVE_API_KEY" \
  | jq '.data_types.fills | {completeness, gaps, cadence}'
```

```json theme={"theme":"github-dark"}
{
  "completeness": 100.0,
  "gaps": [],
  "cadence": {
    "median_interval_seconds": 1.0,
    "p95_interval_seconds": 2.0,
    "sample_count": 72148
  }
}
```

Trades are reported as `fills`; the other entries under `data_types` cover data types such as `orderbook`, `funding` and `open_interest`. Each `gaps` entry has `start`, `end` and `duration_minutes`. An empty `gaps` array and full `completeness` mean the missing rows are not a recorded capture gap, so go back to the request. Without the version header, the data-quality routes return their fields at the top level instead of inside `data`.

A quiet interval is not a gap. No trade during a calm minute is not a capture failure, so compare the interval with the `cadence` figures before you call it one.

## Check incidents that overlap the window

```bash theme={"theme":"github-dark"}
curl -sS "https://api.0xarchive.io/v1/data-quality/incidents?exchange=hyperliquid&limit=100" \
  -H "X-API-Key: $OXARCHIVE_API_KEY" \
  | jq --argjson s "$START" --argjson e "$END" '
      def ms: sub("\\.[0-9]+"; "") | fromdateiso8601 * 1000;
      .incidents[]
      | select((.started_at | ms) < $e and (.resolved_at == null or (.resolved_at | ms) > $s))
      | {id, status, started_at, resolved_at, data_types, symbols_affected, title}'
```

Keep each incident that started before the window ended and was unresolved or resolved after it began, then check its `data_types` and `symbols_affected`. The `since` parameter filters by start time only, so it misses an incident that began before the window and was still open during it. Page with `offset` when `pagination.total` is larger than the page.

## Decide what the missing rows are

| Finding | Action |
| - | - |
| A request check explains it | Fix the request and pull again. Record nothing as a gap |
| Coverage lists a gap or an incident overlaps the window | It is a data gap. Mark the output partial or interrupted with the gap bounds and incident ID, and never fill it with synthetic rows |
| Replay sent `gap_detected` | Mark the output incomplete, or rebuild from a checkpoint after the gap |
| The window ends after the data type's `last_updated` on the freshness route | The end of the window is not ingested yet. Wait and pull again |
| Coverage is complete, no incident, and rows still look wrong | Send support the route, parameters, `request_id`, and the timestamps you expected |

[Data quality](https://docs.0xarchive.io/data-quality.md) defines gaps, delayed finalization and ambiguous intervals, and [Status monitoring](https://docs.0xarchive.io/status-monitoring.md) covers service-wide outages.

## Verify the fix

* The decision, the coverage and incident results, and every `request_id` are stored beside the output.
* A window marked complete has no overlapping incident and no listed gap for its data type.
* After a request fix, the rows run from `start` to `end`; after a data gap, the missing interval matches the recorded gap or incident.

## Related

* [Data quality](https://docs.0xarchive.io/data-quality.md): coverage, freshness, incidents and gap handling
* [Data quality routes](https://docs.0xarchive.io/rest-api/data-quality.md): response fields for each route
* [Status monitoring](https://docs.0xarchive.io/status-monitoring.md): service status and public incidents
* [Errors](https://docs.0xarchive.io/errors.md): every `error_code` and what to do next

## Next step

**Look up the error you received**

When a request failed outright, its error code says whether to fix the request, wait, or stop.

[Read the error codes](https://docs.0xarchive.io/errors.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.