txpool_inspect
https://api.triport.io/v1/polygonReturns a human-readable, formatted summary of every transaction currently in the Polygon mempool, grouped by sender address and nonce.
txpool_inspect returns a textual snapshot of the node's transaction pool. Each
pending and queued transaction is rendered as a one-line summary string of the
form sender: amount wei + gas × gasPrice wei, keyed by the originating address
and then by nonce. It is the formatted, debug-friendly middle ground between
txpool_status (just the pending/queued counts) and
txpool_content (the full transaction bodies).
Use it for observability and ad-hoc debugging — eyeballing what an address has
sitting in the pool, spotting nonce gaps that leave transactions stuck in
queued, or checking the gas price of pending transactions during congestion.
Because the values are pre-formatted strings rather than structured fields, it is
not suited to production indexing or programmatic fee analysis; reach for
txpool_content when you need machine-parseable transaction data.
The mempool is a live, node-local view: results reflect the state of the
upstream node at the instant of the call and differ between successive requests.
This is a premium, pro-tier capability with a deliberately low rate limit —
the payload is mid-weight (larger than txpool_status, smaller than
txpool_content) and the upstream node spends CPU formatting each entry.
Parameters
This method takes no parameters. Send an empty params array.
——optionalResponse
Response fields
| Field | Type | Description |
|---|---|---|
result.pending | object | Transactions ready for inclusion in the next block. Keyed by sender address. |
result.queued | object | Transactions not yet executable (e.g. a nonce gap ahead of them). Keyed by sender address. |
result.pending[address] | object | Map of nonce → formatted summary string for that sender's pending transactions. |
result.queued[address] | object | Map of nonce → formatted summary string for that sender's queued transactions. |
result.*[address][nonce] | string | One-line summary: <recipient>: <value> wei + <gas> gas × <gasPrice> wei. |
Both pending and queued are always present; either may be an empty object
{} when there are no transactions of that kind.
Errors
Errors use the shared JSON-RPC error envelope — see errors.md for the full structure.
| Code | Meaning | When it happens |
|---|---|---|
-32002 | tier_insufficient | Your plan is below the pro tier required for the polygon_txpool category. |
-32003 | rate_limited | You exceeded your tier's RPS for this method (1 RPS on pro, 2 RPS on business). |
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/v1/polygon", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "txpool_inspect",
params: [],
}),
});
const { result } = await res.json();
const pendingCount = Object.values(result.pending)
.reduce((n, byNonce) => n + Object.keys(byNonce).length, 0);
console.log(`${pendingCount} pending transactions in the pool`);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
const pool = await triport.polygon.txpoolInspect();
for (const [address, byNonce] of Object.entries(pool.pending)) {
for (const [nonce, summary] of Object.entries(byNonce)) {
console.log(`${address} #${nonce} → ${summary}`);
}
}Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
pool = client.polygon.txpool_inspect()
for address, by_nonce in pool["pending"].items():
for nonce, summary in by_nonce.items():
print(f"{address} #{nonce} -> {summary}")Notes
- Formatted, not structured. Values are human-readable strings. For
programmatic access to transaction fields (calldata, value, gas, gas price as
discrete values) use
txpool_contentinstead. - Low rate limit by design. At 1 RPS (pro) / 2 RPS (business), poll
sparingly. For lightweight, high-frequency pool-depth tracking use
txpool_status, which returns only the two counts. - Live, node-local snapshot. The mempool view is taken from the upstream node at call time and changes between requests; it is not a consensus-confirmed value.
- Rate limits are RPS-per-tier with a burst allowance (
burst_capacity = 2 × limit_rps) — there is no daily quota. See Rate limits.