getFirstAvailableBlock

POSTBlocksFreeOperatorBlade RunnerNexus

Returns the oldest block from which every later block can be retrieved with getBlock.

Try itSends a real request from your browser to the selected region.
POST
/

getFirstAvailableBlock returns the oldest block from which every later block can be retrieved with getBlock. With long-term storage (Blade Runner and Nexus plans) it returns 0, the genesis block, because Cube Runner can retrieve every block since genesis from long-term storage.

Without it (Free and Operator plans) it returns the oldest block from which the region holds every later block, in its cache or its ledger. The value rises as old blocks are pruned. Older blocks are still returned when a cache in any region holds them.

A backward walk through getBlock history that needs every block stops at this slot. minimumLedgerSlot marks the same limit for getTransaction.

Plans & rate limitsFreeOperatorBlade RunnerNexus
Free5/s
Operator50/s
Blade Runner200/s
Nexus500/s

Historical lookups

PlanReturns
FreeThe region's oldest block
OperatorThe region's oldest block
Blade Runner0 (genesis)
Nexus0 (genesis)

Parameters

This method takes no parameters.

Result

resultinteger

The oldest slot from which every later block can be retrieved with getBlock. 0 in the Blade Runner and Nexus plans.

Notes

  • In the Free and Operator plans, a getBlock request for a block that no cache, ledger or other region holds returns code -32001 with HTTP 200. The message and data.firstAvailableBlock carry this value.