Loading documentation…
Cached upcoming Solana leader slots with rpc edge route quality for transaction routing decisions.
getLeaderSlots is an rpc edge JSON-RPC extension for transaction senders. It
returns upcoming Solana leader slots plus measured rpc edge route quality, so a
client can choose where to submit transactions before the slot arrives.
This is not an Agave RPC method. The gateway serves it from a local cache fed by rpc edge routing telemetry and the Solana leader schedule.
Use the normal JSON-RPC endpoint:
https://rpc.rpcedge.com
https://frankfurt.rpc.rpcedge.comAuthenticate like other RPC calls. Supported forms include:
x-token: YOUR_UUID_KEY
x-api-key: YOUR_UUID_KEY
authorization: Bearer YOUR_UUID_KEY
?key=YOUR_UUID_KEYCall getLeaderSlots as a single JSON-RPC request:
curl -s https://rpc.rpcedge.com \
-H 'content-type: application/json' \
-H 'x-token: YOUR_UUID_KEY' \
-d '{"jsonrpc":"2.0","id":1,"method":"getLeaderSlots","params":[429641447,10]}'| Position | Name | Type | Notes |
|---|---|---|---|
0 | startSlot | u64 | First slot to return. Use a recent current slot for live routing. |
1 | limit | u64 | Optional. Defaults to the gateway default and is capped at 100 in v1. |
Batch requests containing getLeaderSlots are rejected in v1. Send this method
as its own JSON-RPC request.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"success": true,
"total": 2,
"data": [
{
"slot": 429641447,
"identity": "validatorIdentityPubkey",
"stake": 123456789,
"location": {
"dataCenterKey": "fra",
"region": "frankfurt",
"latitude": 50.11,
"longitude": 8.68
},
"pingToLeaders": [
{
"region": "frankfurt",
"latencyMs": 2,
"estimated": false
}
],
"txPaths": [
{
"provider": "rpcedge",
"pathRegion": "frankfurt",
"latencyMs": 3,
"measured": true,
"doublezeroAvailable": false,
"selected": true
}
],
"routeScores": [
{
"active_region": "frankfurt",
"market_latency_ms": 2,
"tx_latency_ms": 3,
"score_ms": 5,
"selected": true
}
]
}
],
"snapshotSlot": 429641440,
"snapshotGeneratedAtUnixMs": 1782748800000,
"snapshotAgeMs": 350
}
}| Field | Meaning |
|---|---|
slot | Solana slot covered by this row. |
identity | Scheduled leader validator identity. |
stake | Leader stake from the schedule metadata source. |
location | Best-known leader location metadata, if available. |
pingToLeaders | Region-to-leader latency estimates or measurements. |
txPaths | Available rpc edge transaction paths for the leader. |
routeScores | Combined route score by active region. Lower is better. |
snapshotSlot | Solana slot used when the snapshot was built. |
snapshotAgeMs | Gateway-side age of the cached snapshot. |
routeScores[].score_ms is currently market_latency_ms + tx_latency_ms. Treat
route scores as advisory routing inputs, not a guarantee that a later
transaction lands.
The gateway fails closed if the cached leader-slot snapshot is missing, stale,
outside the requested slot range, or on an unsupported schema version. The
response is a normal JSON-RPC error with your request id preserved.
Common recovery behavior:
| Error family | Client behavior |
|---|---|
| Cache empty or stale | Retry after a short delay, or fall back to your default transaction path. |
| Requested range not covered | Refresh your current slot and request a smaller near-future range. |
| Unsupported schema | Treat as incompatible and alert; this should be rare. |