Chains API
How far away a future block is
Remaining blocks and an estimated wait, in seconds, until a caller-supplied future block number is mined.
/api/external/chain-analysis/block-countdown/{chain}What it returns
Remaining blocks and an estimated wait, in seconds, until targetBlock is mined. alreadyMined is true when the target has already been produced — the source's own named answer for that case, distinct from every other field being null for a genuinely unavailable reading. Every other field is null when nothing could be established, never 0. Where no countdown service answers — always on ARC and RHC — the chain's own block headers do: currentBlock is the latest header, and estimatedSeconds is the remaining blocks times the mean block time over the last 10,000 blocks. On SOL the block is the slot: currentBlock is the newest confirmed slot, and estimatedSeconds uses the mean slot time over the last hour.
Chains
- Solana SOL
- BNB Chain BNB
- Ethereum ETH
- Stable STABLE
- Base BASE
- Robinhood Chain RHC
- Arc ARC
Request
Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.
curl -H "x-dex-data-key: $DEXDATA_API_KEY" \ "https://api.dexdata.io/api/external/chain-analysis/block-countdown/SOL?targetBlock=<targetBlock>"
| Parameter | Description |
|---|---|
targetBlockquery · integer · required | The future block number to count down to — on SOL, the slot. |
chainpath · string · required | ETH, BNB, BASE, STABLE, ARC, RHC, SOL; every other chain returns 400. |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
targetBlock | integer | Echoes the request. |
currentBlock | integer | null | The chain's tip at the moment this was measured. |
remainingBlocks | integer | null | |
estimatedSeconds | number | null | |
alreadyMined | boolean | True only for the source's own "this block already exists" answer, in which case every other field is null — see the endpoint description. |
Start building with DexData today
Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.
Get a free API key