txpool_inspect
https://api.triport.io/v1/ethReturns a compact, human-readable summary of the transactions currently pending and queued in the node's transaction pool.
txpool_inspect lists the transactions the backing Ethereum node is holding in
its mempool, grouped into pending (executable now) and queued (not yet
executable, e.g. a nonce gap). The result is keyed by sender address and then by
nonce. Each transaction is rendered as a short, human-readable string rather
than a full transaction object — recipient: value wei + gas × gasPrice wei.
Use it for a quick, low-bandwidth overview of mempool state: which senders have transactions in flight, at which nonces, and at what value and price. When you need the full structured transaction objects (input data, signatures, fee fields, etc.) call txpool_content instead; for just the pending/queued counts call txpool_status.
This method belongs to the eth_txpool category and is restricted to the
Pro tier and above. The data reflects the specific node serving your
request — the mempool is local to each node, varies continuously, and is not
consensus state, so successive calls (and calls hitting different nodes) will
differ. It takes no parameters.
Parameters
This method takes no parameters. Send an empty params array.
——optionalResponse
Response fields
| Field | Type | Description |
|---|---|---|
jsonrpc | string | JSON-RPC protocol version, always "2.0". |
id | number | string | Echoes the request id. |
result | object | Container with two keys, pending and queued. |
result.pending | object | Executable transactions, keyed by sender address. Empty object {} if none. |
result.queued | object | Non-executable transactions (e.g. nonce gaps), keyed by sender address. Empty object {} if none. |
result.pending.<address> | object | Map of nonce → summary string for that sender's executable transactions. |
result.queued.<address> | object | Map of nonce → summary string for that sender's queued transactions. |
result.*.<address>.<nonce> | string | Compact summary in the form recipient: value wei + gas × gasPrice wei. Values are decimal strings. |
Errors
| Code | Meaning | When it happens |
|---|---|---|
-32002 | tier_insufficient | Your plan is below the Pro tier required for txpool_inspect. The error data includes current_tier, required_tier, and an upgrade_url. |
-32003 | rate_limited | You exceeded the per-tier RPS limit (1 RPS on Pro, 2 RPS on Business). The error data includes limit_rps, burst_capacity, and retry_after_sec. |
Example error envelope (tier too low):
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32002,
"message": "tier insufficient for method txpool_inspect",
"data": {
"method": "txpool_inspect",
"category": "eth_txpool",
"chain": "eth",
"current_tier": "free",
"required_tier": "pro",
"upgrade_url": "https://api.triport.io/upgrade"
}
}
}See errors.md for the full error envelope and the shared error-code reference.
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/v1/eth", {
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 pendingSenders = Object.keys(result.pending).length;
const queuedSenders = Object.keys(result.queued).length;
console.log(`pending senders: ${pendingSenders}, queued senders: ${queuedSenders}`);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY });
type TxPoolInspect = {
pending: Record<string, Record<string, string>>;
queued: Record<string, Record<string, string>>;
};
const pool = await client.eth.request<TxPoolInspect>("txpool_inspect", []);
for (const [sender, byNonce] of Object.entries(pool.pending)) {
for (const [nonce, summary] of Object.entries(byNonce)) {
console.log(`${sender} #${nonce} → ${summary}`);
}
}Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
pool = client.eth.request("txpool_inspect", [])
for sender, by_nonce in pool["pending"].items():
for nonce, summary in by_nonce.items():
print(f"{sender} #{nonce} -> {summary}")Notes
- No parameters and no pagination — the response is the full mempool snapshot as seen by the serving node at request time. On a busy node this can be large.
- Each transaction is a string summary, not an object. For full transaction objects use txpool_content; for just the counts use txpool_status.
- Requires the Pro tier; a lower tier returns
-32002(tier_insufficient). Theeth_txpoolcategory is rate-limited tightly — 1 RPS on Pro and 2 RPS on Business — so poll sparingly and cache results. - The mempool is per-node and non-deterministic: results vary between calls and between nodes, and are never part of consensus state.
- Rate limiting is RPS-per-tier with burst; there is no daily quota.