ReferenceManagement API
Retrieve customer key statistics
GET
Requires the partner:read scope. Returns transaction counts, landed rate, median slots to land and tips for one customer key over the selected window. range accepts 24h, 7d or 30d and defaults to 24h. Landed rate is a percentage; tips are integer lamports from landed transactions. last_seen_at can precede the selected window. Own, missing or foreign key IDs return 404 not_found.
managementKeyheader
AuthorizationBearer <zc_mgmt_>id*stringMatch
^key_[0-9a-f]{12}$range?stringTrailing analytics window
Default
"24h"Value in
"24h""7d""30d"Its figures
application/json- response
key_id*stringwindow*stringValue in
"24h""7d""30d"transactions*integerRange
-9007199254740991 <= value <= 9007199254740991landed_rate*number|nullp50_slots_to_land*number|nulltips_lamports*integerRange
-9007199254740991 <= value <= 9007199254740991last_seen_at*|null// src/bin/management_customer_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/customer-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");
endpoint.query_pairs_mut().append_pair("range", "7d");
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": "7d",
"transactions": 1248,
"landed_rate": 97.5,
"p50_slots_to_land": 2,
"tips_lamports": 3670000000,
"last_seen_at": "2026-11-13T02:13:41Z"
}