Chains API
What one Solana slot did
One named slot: whether its leader produced a block, who led it, its transactions split into votes and user traffic, how many failed, the fees paid, and for a recent slot the stake voted on it.
/api/external/chain-analysis/slot-stats/{chain}What it returns
Facts about ONE slot, addressed by number. produced: false is a real answer, not an error: that slot's leader published no block and the chain moved straight on, which happens to a few slots in a thousand, and every other field is then null. A slot the chain has not reached yet is NOT that answer — it returns 404, because the slot has no history to describe yet. transactions.total counts everything the block carried, consensus votes included, and votes are about half of a Solana block: read nonVote for the user traffic. nonVoteFailed counts transactions that were included and then failed — they paid their fee and are part of the block, and roughly two in five non-vote transactions land that way, so a failure count near half is normal and not a degraded answer. feesLamports is what every transaction in the slot paid; leaderFeeLamports is what the leader was credited, which is the larger part of it but not all of it — both are published raw and neither is derived from the other. blockTime is null on early slots, which carry no block time at all. commitment is how much stake has voted on the block and how much of it has rooted it; the chain keeps that tally only for its most recent few hundred slots (about two minutes), so it is null on any older slot, and within that window it moves from one request to the next as votes deepen.
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/slot-stats/SOL?slot=<slot>"
| Parameter | Description |
|---|---|
slotquery · integer · required | The slot to describe. History goes back to slot 0. |
chainpath · string · required | SOL only; every other chain returns 400. Solana numbers its leader turns slots, and a slot can pass without a block — a question the block-numbered chains do not have. |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
slot | integer | Echoes the request. |
produced | boolean | False when the slot passed without a block. Every other field is then null. |
blockhash | string | null | The block published in this slot. |
parentSlot | integer | null | The slot of the block this one builds on. More than one below slot when the slots in between were skipped. |
blockTime | integer | null | Unix seconds. Null on early slots, which record no block time. |
blockHeight | integer | null | How many blocks precede this one. Always below slot, by the number of slots skipped since genesis. |
leader | string | null | The validator identity credited this slot's fee reward. |
leaderFeeLamports | integer | null | Lamports credited to the leader. Most of feesLamports, never all of it — the rest is burned. |
feesLamports | integer | null | Lamports every transaction in the slot paid, votes included. |
transactions | object | null | |
transactions.total | integer | Every transaction in the slot, votes included. |
transactions.vote | integer | Consensus votes. About half of a typical slot. |
transactions.nonVote | integer | Everything else: the user traffic. |
transactions.nonVoteFailed | integer | Non-vote transactions that were included and failed. They paid their fee. Near half is normal. |
transactions.voteFailed | integer | Votes that failed. A real 0 in every slot measured, not an absent field. |
commitment | object | null | The stake that has voted on this block, in SOL. Null when the slot produced no block, when the slot is older than the few hundred most recent (the chain no longer keeps the tally), or when the tally could not be read. Within the window it changes between requests. |
commitment.votedStakeSol | number | Stake whose vote history includes this block, at any depth. |
commitment.rootedStakeSol | number | Of it, the stake whose validators have rooted the block — it can no longer be undone for them. Reaches votedStakeSol about 32 slots after the block. |
commitment.totalStakeSol | number | Total active stake this epoch. The gap to votedStakeSol is stake that is not voting. |
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