ReferenceManagement API
Retrieve key statistics
GET
Requires the usage:read scope. Returns transaction counts, landed rate, median slots and tips for an own key's last 24 hours. Tips are integer lamports of SOL value, token tips included.
managementKeyheader
AuthorizationBearer <zc_mgmt_>id*stringMatch
^key_[0-9a-f]{12}$Its figures
application/json- response
key_id*stringwindow*stringtransactions*integerRange
-9007199254740991 <= value <= 9007199254740991landed_rate*number|nullp50_slots_to_land*number|nulltips_lamports*integerRange
-9007199254740991 <= value <= 9007199254740991last_seen_at*|null// src/bin/management_key_stats.rs
// Builds on the example project (/reference/json-rpc#example-project).
use swqos_examples::swqos::{Result, required};
#[tokio::main]
async fn main() -> Result<()> {
let key_id: String = required("KEY_ID")?;
let mut endpoint = reqwest::Url::parse("https://console.zerocopy.sh/api/v1/keys/")?;
endpoint.path_segments_mut().map_err(|_| "invalid base URL")?
.pop_if_empty().push(&key_id);
endpoint.path_segments_mut().map_err(|_| "invalid base URL")?.push("stats");
let request = reqwest::Client::new()
.get(endpoint)
.bearer_auth(required("MANAGEMENT_API_KEY")?);
let response = request.send().await?;
let status = response.status();
let request_id = response.headers().get("Request-Id")
.map(|value| value.to_str()).transpose()?.unwrap_or("<missing>").to_owned();
if let Some(etag) = response.headers().get("ETag") {
eprintln!("ETag: {}", etag.to_str()?);
}
let body = response.text().await?;
if !status.is_success() {
return Err(format!("HTTP {status}; Request-Id: {request_id}; {body}").into());
}
eprintln!("Request-Id: {request_id}");
println!("{body}");
Ok(())
}{
"key_id": "key_012345abcdef",
"window": "24h",
"transactions": 1248,
"landed_rate": 97.5,
"p50_slots_to_land": 2,
"tips_lamports": 3670000000,
"last_seen_at": "2026-11-13T02:13:41Z"
}