ZeroCopyZeroCopy
ReferenceManagement API

Retrieve customer key statistics

GET
/customer-keys/{id}/stats

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.

Authorization

managementKey
headerAuthorizationBearer <zc_mgmt_>

Path Parameters

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

Query Parameters

range?string

Trailing analytics window

Default"24h"
Value in"24h""7d""30d"

Response Body

Its figures

application/json
  1. response
key_id*string
window*string
Value in"24h""7d""30d"
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_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(())
}
Example response
{
  "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"
}