minimumLedgerSlot
Returns the lowest slot that the node has information about in its ledger.
Common use cases
| Historical query validation | Validate slot parameters before requesting historical blocks or transactions to avoid querying purged data. Essential before calling getBlock or getTransaction with older slots to prevent unnecessary errors. |
| Data retention monitoring | Track ledger retention policies by monitoring changes in minimum ledger slot over time. Useful for infrastructure operators to understand node storage behavior and plan data archival strategies. |
Parameters
No parameters required.
Request
- cURL
- JavaScript
- Python
curl https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "minimumLedgerSlot"
}'
// Using fetch
const response = await fetch('https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "minimumLedgerSlot"
})
});
const data = await response.json();
console.log(data);
import requests
import json
url = 'https://solana-mainnet.api.syndica.io/api-key/YOUR_API_KEY'
headers = {'Content-Type': 'application/json'}
data = {
"jsonrpc": "2.0",
"id": 1,
"method": "minimumLedgerSlot"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Replace mainnet with devnet in the URL to query devnet instead.
Response
{
"jsonrpc": "2.0",
"result": 1234,
"id": 1
}
Response Fields
Return value: u64
The minimum ledger slot number
FAQ and Troubleshooting
What's the difference between minimumLedgerSlot and getFirstAvailableBlock?
Both return the oldest available slot, but query different storage layers. minimumLedgerSlot queries the validator's local ledger (RocksDB), while getFirstAvailableBlock queries long-term storage (BigTable). For RPC nodes with deep historical storage, getFirstAvailableBlock typically returns a much older slot.
Why does minimumLedgerSlot value increase over time?
Validators purge old ledger data based on retention policies (configured with --limit-ledger-size) to manage disk space. As old slots are purged, the minimum slot value increases. This is normal behavior and not an error condition.
Does minimumLedgerSlot accept a commitment parameter?
No. Unlike most slot-related methods, minimumLedgerSlot takes no parameters. It returns the ledger storage boundary, which is independent of commitment levels or chain state.
Related Methods
getFirstAvailableBlock
Returns oldest slot in long-term storage (BigTable). Complements minimumLedgerSlot which queries volatile ledger storage; use both to understand complete data availability boundaries.
getSlot
Returns current slot at specified commitment. Pair with minimumLedgerSlot to determine the full range of available slot data on the node.
getBlock
Returns block data for a specific slot. Validate slot parameter against minimumLedgerSlot before calling to avoid requesting purged blocks.