Leader slot API

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.

Request

Use the normal JSON-RPC endpoint:

https://rpc.rpcedge.com
https://frankfurt.rpc.rpcedge.com

Authenticate 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_KEY

Call 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]}'

Parameters

PositionNameTypeNotes
0startSlotu64First slot to return. Use a recent current slot for live routing.
1limitu64Optional. 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.

Response

{
  "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 semantics

FieldMeaning
slotSolana slot covered by this row.
identityScheduled leader validator identity.
stakeLeader stake from the schedule metadata source.
locationBest-known leader location metadata, if available.
pingToLeadersRegion-to-leader latency estimates or measurements.
txPathsAvailable rpc edge transaction paths for the leader.
routeScoresCombined route score by active region. Lower is better.
snapshotSlotSolana slot used when the snapshot was built.
snapshotAgeMsGateway-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.

Errors and staleness

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 familyClient behavior
Cache empty or staleRetry after a short delay, or fall back to your default transaction path.
Requested range not coveredRefresh your current slot and request a smaller near-future range.
Unsupported schemaTreat as incompatible and alert; this should be rare.
Leader slot API · rpc edge docs