ZeroCopyZeroCopy
ReferenceJSON-RPC

getTipFloor

POST
/

Read an edge's observed landed-tip percentiles with getTipFloor. Your key's minimum tip still applies.

Authorization

headerx-api-key<token>

Send the SWQoS API key in this header. See the authentication reference for compatibility forms and precedence.

Request Body

One JSON object using the shared request conventions. The method takes no params.

application/json
  1. body
jsonrpc*"2.0"
Value in"2.0"
id?||

Optional request id, echoed exactly in the response. Null when absent or refused before the id could be read.

method*"getTipFloor"
Value in"getTipFloor"
params?unknown

Ignored when present.

Response Body

Returns an array of zero or one observed tip-floor snapshots in result; an empty array means no recent landing data.

Refusals with HTTP 200, by error.data.reason:

application/json
  1. response
jsonrpc*"2.0"
Value in"2.0"
result*array<>

Zero or one tip floor snapshot; an empty array means no recent landing data is available. Token tips count at their SOL value. The snapshot describes tips that already landed and does not predict landing; your key's minimum tip still applies. Each metro reports its own values; use a named metro hostname to compare them.

Itemsitems <= 1
id*||

Optional request id, echoed exactly in the response. Null when absent or refused before the id could be read.

Example request
// Builds on the example project (/reference/json-rpc#example-project).
use serde::Deserialize;
use swqos_examples::swqos::{Result, call};

#[derive(Deserialize)]
struct TipFloor {
    time: String,
    landed_tips_50th_percentile: u64,
}

#[tokio::main]
async fn main() -> Result<()> {
    let floors: Vec<TipFloor> = call("getTipFloor", None).await?;
    if let Some(floor) = floors.first() {
        println!(
            "{}: median landed tip {} lamports",
            floor.time, floor.landed_tips_50th_percentile
        );
    } else {
        println!("no recent landing data");
    }
    Ok(())
}
Example response
{
  "jsonrpc": "2.0",
  "result": [],
  "id": 1
}