Status
Data freshness (last swaps)
Check how recently ChainQuery indexed a swap on each chain. Returns 503 when any chain is stale.
GET
Reports, for each chain you ask about, the time of the most recent indexed swap (its block time) and how far behind now that is. Use it to decide whether data is fresh enough before relying on it, or to monitor ChainQuery from your own alerting.
This endpoint lives at the host root, not under
/api/v1: https://api.example.com/health/last-swaps. Whether it is reachable on the public host is still being confirmed. If you get a 404 there, the route is not exposed yet.How it works
For each chain inchains:
- Find the newest indexed swap from the last
lookbackMinutes. - If there is none, the chain is
stale, withlastSwapAtandlagMinutesset tonull. - Otherwise
lagMinutesis the time since that swap, in minutes rounded to one decimal. The chain isstaleiflagMinutesis greater thantoleranceMinutes, otherwiseok.
ok is true only when every chain is ok. When any chain is stale, the endpoint answers 503 with the full report in details, so a plain HTTP status check is enough for uptime monitors.
Chain ids are not checked against the supported chains. An id ChainQuery doesn’t index simply has no swaps and is reported as stale.
Query parameters
Comma-separated chain ids, each with or without the
evm: prefix: 1,8453 or evm:1,evm:8453. At least one id; each must be a positive integer.Maximum lag, in minutes, for a chain to count as
ok. Must be greater than 0; decimals are allowed.How far back, in minutes, to look for the latest swap. Must be greater than 0 and greater than or equal to
toleranceMinutes.Response
success when every chain is fresh. When any chain is stale the response is a 503 error instead; see Errors.