Chains API

Is this Solana blockhash still valid?

Whether a transaction built on a given Solana blockhash would still be accepted right now, read at a chosen commitment; a blockhash expires about 150 blocks (60 to 90 seconds) after its block.

GET/api/external/chain-analysis/blockhash-validity/{chain}

What it returns

Whether a transaction built on this blockhash would still be accepted right now. A Solana transaction names a recent blockhash, and the chain accepts it only for about 150 blocks (60 to 90 seconds) after that block; after that the transaction must be rebuilt on a newer one. valid: false covers both an expired blockhash and one the chain never produced — the chain does not tell the two apart. commitment is how settled the chain state read is: processed and confirmed see a block within about a second of it, while finalized only sees it about 13 seconds later, so a brand-new blockhash reads false at finalized until its block finalizes. Never cached: every request reads the chain.

Chains

  • Solana SOL

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/blockhash-validity/SOL?blockhash=<blockhash>"
Parameters
ParameterDescription
blockhash

query · string · required

The blockhash to check: base58, 32 bytes (32 to 44 characters).
commitment

query · string · optional

How settled the chain state read is: processed, confirmed or finalized. Defaults to confirmed, the level a new transaction is usually built on.processedconfirmedfinalized
chain

path · string · required

SOL only; 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.

Response fields of Is this Solana blockhash still valid?
FieldTypeDescription
blockhashstringEchoes the request.
commitmentstringThe commitment read, as requested or defaulted.
validbooleanTrue when a transaction built on it would still be accepted. False when it expired or never existed.
checkedAtSlotintegerThe slot the chain was read at.

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