getTipFloor
Read an edge's observed landed-tip percentiles with getTipFloor. Your key's minimum tip still applies.
x-api-key<token>Send the SWQoS API key in this header. See the authentication reference for compatibility forms and precedence.
One JSON object using the shared request conventions. The method takes no params.
application/json- body
jsonrpc*"2.0""2.0"id?||Optional request id, echoed exactly in the response. Null when absent or refused before the id could be read.
method*"getTipFloor""getTipFloor"params?unknownIgnored when present.
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:
invalid_request: invalid JSON-RPC body.unsupported:feature: tip_floor; query a hosted endpoint, since the local agent does not serve it.
application/json- response
jsonrpc*"2.0""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.
items <= 1id*||Optional request id, echoed exactly in the response. Null when absent or refused before the id could be read.
// 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(())
}{
"jsonrpc": "2.0",
"result": [],
"id": 1
}