getSlot
Read the edge's highest observed slot with getSlot; params and commitment do not affect the result.
// updated 2026-11-17
Supanode issues keys through Telegram. Default minimum tip: 0.001 SOL; default rate: 15 sends/s per key per metro. Your key settings can differ. Declared tips are off by default and require enablement and a payment arrangement with Supanode. If your key returns partner_declared_tips, use an on-chain transfer instead.
POST https://fra.tpu.supanode.xyz/
Authentication: API key, one of: x-api-key header, api-key query, Authorization: Bearer header.
Request body (application/json)
One JSON object using the shared request conventions. The method takes no params.
| Field | Type | Required | Description |
|---|---|---|---|
jsonrpc | "2.0" | yes | |
id | string or number or null | no | Optional request id, echoed exactly in the response. Null when absent or refused before the id could be read. |
method | "getSlot" | yes | |
params | any | no | Ignored when present, so a commitment has no effect. |
{
"jsonrpc": "2.0",
"id": 1,
"method": "getSlot"
}
Responses
200
Returns the highest slot the edge has observed, as an integer. It may not be committed yet. Use your Solana RPC provider for confirmation and block heights.
Refusals with HTTP 200, by error.data.reason:
invalid_request: invalid JSON-RPC body.
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
jsonrpc | "2.0" | yes | |
result | integer | yes | The highest slot the edge has observed. It may not be committed yet. minimum: 0. |
id | string or number or null | yes | Optional request id, echoed exactly in the response. Null when absent or refused before the id could be read. |
jsonrpc | "2.0" | yes | |
error | object | yes | |
error.code | -32700 or -32600 or -32601 or -32602 or -32603 or -32000 or -32001 or -32002 or -32003 | yes | Status codes maps reasons and problems to codes. Match on data.reason. |
error.message | string | yes | The same sentence as data.message. |
error.data | object | yes | Reason-specific fields are included alongside these members, such as minimum, found, declared, available, unpaid_lamports, index, per_second and retry_after_ms. Failed preflight also includes Solana simulation fields such as err, logs and unitsConsumed. |
error.data.reason | string | yes | Stable snake_case reason. Match on this; message wording can change, and the numeric codes are shared with Solana's RPC. |
error.data.message | string | yes | What happened and what to change. Wording can change. |
error.data.retryable | boolean | yes | Whether the unchanged request can succeed later. Wait before retrying, and check that the transaction has not expired. |
error.data.docs | string (uri) | no | Optional error documentation URL followed by the reason anchor. Supanode endpoints omit this field. |
id | string or number or null | yes | Optional request id, echoed exactly in the response. Null when absent or refused before the id could be read. |
{
"jsonrpc": "2.0",
"result": 123456789,
"id": 1
}
{
"jsonrpc": "2.0",
"error": {
"code": -32700,
"message": "the body is not valid JSON",
"data": {
"reason": "invalid_request",
"problem": "parse_error",
"message": "the body is not valid JSON",
"retryable": false
}
},
"id": null
}
401
unauthorized: missing, unknown or revoked API key.
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
jsonrpc | "2.0" | yes | |
error | object | yes | |
error.code | -32700 or -32600 or -32601 or -32602 or -32603 or -32000 or -32001 or -32002 or -32003 | yes | Status codes maps reasons and problems to codes. Match on data.reason. |
error.message | string | yes | The same sentence as data.message. |
error.data | object | yes | Reason-specific fields are included alongside these members, such as minimum, found, declared, available, unpaid_lamports, index, per_second and retry_after_ms. Failed preflight also includes Solana simulation fields such as err, logs and unitsConsumed. |
error.data.reason | string | yes | Stable snake_case reason. Match on this; message wording can change, and the numeric codes are shared with Solana's RPC. |
error.data.message | string | yes | What happened and what to change. Wording can change. |
error.data.retryable | boolean | yes | Whether the unchanged request can succeed later. Wait before retrying, and check that the transaction has not expired. |
error.data.docs | string (uri) | no | Optional error documentation URL followed by the reason anchor. Supanode endpoints omit this field. |
id | string or number or null | yes | Optional request id, echoed exactly in the response. Null when absent or refused before the id could be read. |
{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "API key missing or not recognized; pass it as the api-key query parameter, an x-api-key header or Authorization: Bearer",
"data": {
"reason": "unauthorized",
"message": "API key missing or not recognized; pass it as the api-key query parameter, an x-api-key header or Authorization: Bearer",
"retryable": false
}
},
"id": null
}
421
Unknown or removed TLS SNI or HTTP Host/:authority. Returns plain text without a JSON-RPC envelope or rejection object. The current hostname policy also applies to existing connections and resumed TLS sessions.
Content type: text/plain
This hostname is not served here. Check the endpoint address
Code samples
// Builds on the example project (/reference/json-rpc#example-project).
use swqos_examples::swqos::{Result, SwqosError, call};
#[tokio::main]
async fn main() -> Result<()> {
match call::<String>("getHealth", None).await {
Ok(health) => println!("health {health}"),
Err(error) => {
if error
.downcast_ref::<SwqosError>()
.is_some_and(|error| error.code == -32005)
{
println!("edge not ready");
} else {
return Err(error);
}
}
}
let slot: u64 = call("getSlot", None).await?;
println!("slot {slot}");
Ok(())
}
// Builds on the example project (/reference/json-rpc#example-project).
package swqos
import (
"context"
"errors"
"fmt"
)
func PrintSlot(ctx context.Context) error {
health, err := Call[string](ctx, "getHealth")
if err != nil {
var refusal *SwqosError
if !errors.As(err, &refusal) || refusal.Code != -32005 {
return err
}
fmt.Println("edge not ready")
} else {
fmt.Println("health", health)
}
slot, err := Call[uint64](ctx, "getSlot")
if err != nil {
return err
}
fmt.Println("slot", slot)
return nil
}
// Builds on the example project (/reference/json-rpc#example-project).
import { call, SwqosError } from './swqos.ts'
try {
console.log('health', await call<string>('getHealth'))
} catch (error) {
if (error instanceof SwqosError && error.code === -32005) console.log('edge not ready')
else throw error
}
console.log('slot', await call<number>('getSlot'))