Get aggregate mempool statistics
https://api.triport.io/v1/sol/mempool/stats?window=5mReturns rolling aggregate statistics over recently observed pending Solana transactions — throughput, latency percentiles, and a per-program count breakdown.
GET /v1/sol/mempool/stats rolls up the stream of pending (pre-confirmation)
transactions that Triport observes across its validator set into a single
summary for the requested time window. It is the aggregate companion to
GET /v1/sol/mempool/snapshot, which returns the raw
list of pending transactions instead of these reduced metrics.
Use it to gauge current network pressure (tx_per_sec), inclusion latency
(p50_lat_ms / p95_lat_ms / p99_lat_ms), and which programs are driving
activity right now (by_program). It is well suited to dashboards and
poll-on-an-interval monitors.
Note that Solana has no classical mempool. These figures are derived from pre-confirmation observations and represent an aggregated view, not a canonical, network-wide ground truth. Treat the numbers as indicative trends.
Parameters
Query parameters
windowstringoptional1m. Accepts duration strings such as 1m, 5m, 1h.Response
Response fields
| Field | Type | Description |
|---|---|---|
window | string | The window that was aggregated (echoes the request, e.g. 5m). |
tx_per_sec | number (double) | Mean observed pending-transaction throughput over the window. |
p50_lat_ms | number (double) | Median observed pre-confirmation latency, in milliseconds. |
p95_lat_ms | number (double) | 95th-percentile observed latency, in milliseconds. |
p99_lat_ms | number (double) | 99th-percentile observed latency, in milliseconds. |
by_program | object | Map of program id → count of observed pending transactions that touched that program within the window. |
Errors
| Code | Meaning | When it happens |
|---|---|---|
401 | unauthorized / trial_expired / subscription_expired | Missing, invalid, or expired credentials. |
403 | tier_insufficient / method_unknown | Key lacks the sol_read_rpc_heavy scope or the method is not part of the project's product. |
429 | rate_limited | Sustained RPS for the tier+category exceeded; honor the Retry-After header. |
All errors share the standard Triport envelope (error, message,
request_id). See Errors for the full schema and per-code
fields.
Examples
JavaScript (fetch)
const res = await fetch(
"https://api.triport.io/v1/sol/mempool/stats?window=5m",
{ headers: { Authorization: `Bearer ${process.env.TRIPORT_API_KEY}` } }
);
if (!res.ok) throw new Error(`stats failed: ${res.status}`);
const stats = await res.json();
console.log(`${stats.tx_per_sec.toFixed(0)} tx/s, p99 ${stats.p99_lat_ms} ms`);TypeScript SDK (@triport/sdk)
import { TriportClient } from "@triport/sdk";
const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY! });
const stats = await client.sol.mempool.stats({ window: "5m" });
console.log(stats.tx_per_sec, stats.p99_lat_ms, stats.by_program);Python (triport-sdk)
import os
from triport import TriportClient
client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])
stats = client.sol.mempool.stats(window="5m")
print(stats.tx_per_sec, stats.p99_lat_ms, stats.by_program)Notes
- Window selection. Shorter windows (
1m) react faster to bursts but are noisier; longer windows (1h) smooth out spikes. Pick a window that matches your poll interval. - No pagination. The response is a single fixed-shape summary regardless of
window; only
by_programgrows with the number of distinct programs seen. - Related endpoints. For the underlying pending transactions rather than
rolled-up metrics, use
GET /v1/sol/mempool/snapshot. - Authentication forms. A static project key may also be supplied via the
X-API-Keyheader or the legacy?api-key=query parameter; the Bearer token shown above is the recommended form. See Authentication.