txpool_content
https://api.triport.io/v1/ethReturns every pending and queued transaction currently held in the node's transaction pool, grouped by sender address and nonce.
txpool_content returns the full content of the backing node's transaction
pool: the complete transaction objects for every transaction that is either
pending (executable on the next block) or queued (not yet executable,
typically because of a nonce gap). It is the heavyweight introspection call in
the txpool family — where txpool_status returns only
counts and txpool_inspect returns short summary strings,
txpool_content returns every field of every transaction.
This method belongs to the eth_txpool category and is available from the
Pro tier. Because the response can be very large and the pool is highly
node-specific, the rate limit is intentionally very low — 1 RPS on Pro, 2 RPS
on Business. Call it sparingly: poll on the order of seconds, never in a tight
loop, and prefer txpool_status / txpool_inspect when you only need counts or
a summary. The contents reflect the specific node serving your request, so the
exact set of transactions will vary between calls and between nodes, and is not
a consensus view of the network mempool.
It takes no parameters.
Parameters
This method takes no parameters. Send an empty params array.
——optionalResponse
The result is an object with two top-level keys, pending and queued. Each
is a map keyed by sender address; the value is a map keyed by the
transaction's nonce (as a decimal string), whose value is the full
transaction object.
jsonrpcstring"2.0".idnumber | stringid.resultobjectpending and queued.result.pendingobjectresult.queuedobjectpending. Empty object if none.…<address>.<nonce>objectblockHash, blockNumber, and transactionIndex all null since the transaction is not yet mined.…fromstring…tostring | nullnull for contract-creation transactions.…noncestring…valuestring…gasstring…gasPricestring…maxFeePerGasstring0x2 (EIP-1559) transactions.…maxPriorityFeePerGasstring0x2 transactions.…inputstring…typestring0x0 legacy, 0x1 access-list, 0x2 dynamic-fee.…hashstring…v, …r, …sstringErrors
| Code | Meaning | When it happens |
|---|---|---|
-32002 | tier_insufficient | Your plan is below the Pro tier required for txpool_content. The error data includes current_tier, required_tier, and an upgrade_url. |
-32003 | rate_limited | You exceeded the per-method limit (1 RPS on Pro, 2 RPS on Business). The error data includes limit_rps, burst_capacity, and retry_after_sec. |
Example error envelope (rate limited):
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32003,
"message": "rate limited for method txpool_content",
"data": {
"method": "txpool_content",
"category": "eth_txpool",
"chain": "eth",
"limit_rps": 1,
"burst_capacity": 2,
"retry_after_sec": 1
}
}
}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_content",
params: [],
}),
});
const { result } = await res.json();
const pendingCount = Object.values(result.pending)
.reduce((n, byNonce) => n + Object.keys(byNonce).length, 0);
console.log(`pending transactions: ${pendingCount}`);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY });
type TxPool = {
pending: Record<string, Record<string, unknown>>;
queued: Record<string, Record<string, unknown>>;
};
const pool = await client.eth.request<TxPool>("txpool_content", []);
console.log("senders with pending txs:", Object.keys(pool.pending).length);Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
pool = client.eth.request("txpool_content", [])
pending = sum(len(by_nonce) for by_nonce in pool["pending"].values())
queued = sum(len(by_nonce) for by_nonce in pool["queued"].values())
print(f"pending: {pending}, queued: {queued}")Notes
- Very low rate limit — call sparingly. 1 RPS on Pro, 2 RPS on Business. The
response can be large; do not poll in a tight loop. Exceeding the limit
returns
-32003(rate_limited) with aretry_after_sechint. - No parameters and no pagination — the entire pool is returned in one response. For lighter-weight checks use txpool_status (counts only) or txpool_inspect (summary strings).
- The pool is node-local and changes constantly; results are not a consensus view of the global mempool and will differ between calls and between nodes.
- Requires the Pro tier; a lower tier returns
-32002(tier_insufficient). - Rate limiting is RPS-per-tier with burst; there is no daily quota.