ZeroCopyZeroCopy
ReferenceManagement API

Retrieve key statistics

GET
/keys/{id}/stats

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.

Authorization

managementKey
headerAuthorizationBearer <zc_mgmt_>

Path Parameters

id*string
Match^key_[0-9a-f]{12}$

Response Body

Its figures

application/json
  1. response
key_id*string
window*string
transactions*integer
Range-9007199254740991 <= value <= 9007199254740991
landed_rate*number|null
p50_slots_to_land*number|null
tips_lamports*integer
Range-9007199254740991 <= value <= 9007199254740991
last_seen_at*|null
Example request
// 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(())
}
Example response
{
  "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"
}