eth_callBundle
https://api.triport.io/Simulates a Flashbots-style bundle of transactions against a chosen block **without submitting it**, returning the per-transaction execution results.
eth_callBundle runs an ordered list of signed, raw transactions as an atomic
bundle against a target block and returns what each transaction would do — gas
used, return value, and any revert — without broadcasting anything to the
network. It is the dry-run companion to eth_sendBundle: use it to validate a
bundle, estimate its coinbase payment, and confirm ordering before you commit
real funds.
The bundle is simulated as if it were placed at the top of blockNumber, on top
of the state at the end of stateBlockNumber. Because nothing is submitted, a
successful response is not a guarantee of inclusion — it only tells you the
outcome given the supplied state. Re-simulate against fresh blocks before
sending, since mempool state moves every block.
This method is gated to the pro tier and above. Calls authenticated with a
free-tier key are rejected with -32002.
Parameters
A single object passed as the first (and only) positional element of params.
txsstring[]required0x-prefixed hex), simulated atomically in array order.blockNumberstringrequired0x-prefixed hex. The bundle is simulated as if included in this block.stateBlockNumberstringoptional0x-prefixed hex number whose post-state the simulation runs against (e.g. "latest"). Defaults to the block before blockNumber.timestampnumberoptionalblockNumber.Response
Response fields
| Field | Type | Description |
|---|---|---|
bundleHash | string | Hash identifying the simulated bundle. |
bundleGasPrice | string | Effective gas price across the bundle, in wei. |
coinbaseDiff | string | Total wei the bundle would pay the block builder (gas fees + direct coinbase transfers). |
ethSentToCoinbase | string | Wei sent directly to coinbase via transfers (excludes gas fees), in wei. |
gasFees | string | Total gas fees paid by the bundle, in wei. |
stateBlockNumber | number | The block number whose state the bundle was simulated against. |
totalGasUsed | number | Sum of gas used across all transactions in the bundle. |
results | object[] | Per-transaction simulation results, in the same order as txs. |
results[].txHash | string | Hash of the simulated transaction. |
results[].gasUsed | number | Gas consumed by this transaction. |
results[].gasPrice | string | Effective gas price for this transaction, in wei. |
results[].gasFees | string | Gas fees paid by this transaction, in wei. |
results[].fromAddress | string | Sender address. |
results[].toAddress | string | Recipient / contract address. |
results[].coinbaseDiff | string | Wei this transaction contributes to the builder. |
results[].ethSentToCoinbase | string | Wei sent directly to coinbase by this transaction. |
results[].value | string | Return data of the call (0x-prefixed hex). |
results[].error / results[].revert | string | Present only if the transaction failed; the revert reason or error string. |
Errors
| Code | Meaning | When it happens |
|---|---|---|
-32002 | tier_insufficient | The API key's tier is below pro; this method requires pro or business. |
-32003 | rate_limited | RPS limit for your tier exceeded (pro: 5 RPS, business: 15 RPS). |
-32602 | Invalid params | txs missing/empty, malformed raw transaction, or invalid blockNumber. |
All errors use the standard JSON-RPC envelope — see Errors for the full structure and retry guidance.
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "eth_callBundle",
params: [
{
txs: [rawTx1, rawTx2],
blockNumber: "0x1132a40",
stateBlockNumber: "latest",
timestamp: 1748476800,
},
],
}),
});
const { result } = await res.json();
console.log("coinbaseDiff:", result.coinbaseDiff);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
const sim = await client.ethereum.callBundle({
txs: [rawTx1, rawTx2],
blockNumber: "0x1132a40",
stateBlockNumber: "latest",
timestamp: 1748476800,
});
console.log(sim.totalGasUsed, sim.coinbaseDiff);Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
sim = client.ethereum.call_bundle(
txs=[raw_tx_1, raw_tx_2],
block_number="0x1132a40",
state_block_number="latest",
timestamp=1748476800,
)
print(sim["totalGasUsed"], sim["coinbaseDiff"])Notes
- Simulation only. A successful response does not reserve a slot or
guarantee inclusion. Submit with
eth_sendBundleonce the simulation looks correct, and re-simulate against the newest block first. - Atomic ordering. Transactions run in the exact order given in
txs; a revert earlier in the bundle affects the state seen by later transactions. stateBlockNumberaccepts tags. Pass"latest"to simulate against current head state, or a specific hex block number for reproducible runs.- Wei strings. Monetary fields (
coinbaseDiff,gasFees,bundleGasPrice) are decimal strings in wei to preserve precision. - Related:
eth_sendBundle(submit a bundle for inclusion) — both share theeth_send_bundlescope and the pro/business tier gate.