Documentation index

Bundles

Submit 2-5 transactions as an atomic bundle. All transactions execute in order, or none do. Costs 5 tokens (0.00025 SOL) per bundle regardless of transaction count.

submit_bundle

Bundle — Rust

Rust
// Basic bundle submission
let transactions: Vec<Vec<u8>> = vec![tx1_bytes, tx2_bytes, tx3_bytes];
let result = client.submit_bundle(&transactions).await?;

println!("Bundle ID: {}", result.bundle_id);
println!("Accepted: {}", result.accepted);
for sig in &result.signatures {
    println!("  TX: {}", sig);
}

Bundle — TypeScript

TypeScript
const transactions = [tx1Bytes, tx2Bytes, tx3Bytes];
const result = await client.submitBundle(transactions);

console.log("Bundle ID:", result.bundleId);
console.log("Accepted:", result.accepted);
for (const sig of result.signatures) {
    console.log("  TX:", sig);
}

Bundle — Python

Python
transactions = [tx1_bytes, tx2_bytes, tx3_bytes]
result = await client.submit_bundle(transactions)

print(f"Bundle ID: {result.bundle_id}")
print(f"Accepted: {result.accepted}")
for sig in result.signatures:
    print(f"  TX: {sig}")

Bundle with Tip

You can specify a tip amount in lamports for priority inclusion.

Tipped Bundle — Rust

Rust
let result = client.submit_bundle_with_tip(
    &transactions,
    Some(10_000), // 0.00001 SOL tip in lamports
).await?;

Tipped Bundle — TypeScript

TypeScript
const result = await client.submitBundle(transactions, 10_000); // tip in lamports

Tipped Bundle — Python

Python
result = await client.submit_bundle(transactions, tip_lamports=10_000)

Bundle Rules

  • Minimum: 2 transactions
  • Maximum: 5 transactions
  • Execution: Ordered, atomic — all or nothing
  • Cost: 5 tokens (0.00025 SOL) per bundle, regardless of tx count
  • Tip: Optional, specified in lamports for priority inclusion

BundleResult Fields

FieldTypeDescription
bundle_idstringUnique bundle identifier
acceptedbooleanWhether the bundle was accepted
signaturesstring[]Transaction signatures in order
sender_idstring?Sender used for routing
errorstring?Error message if rejected

Bundle Simulation

Simulate a bundle before submitting to check for errors.

Simulate — Rust

Rust
let results = client.simulate_bundle(&transactions).await?;
for sim in &results {
    if let Some(err) = &sim.err {
        println!("Simulation error: {:?}", err);
    }
    println!("CUs consumed: {}", sim.units_consumed);
    for log in &sim.logs {
        println!("  {}", log);
    }
}

Simulate — TypeScript

TypeScript
const results = await client.simulateBundle(transactions);
for (const sim of results) {
    if (sim.err) console.log("Simulation error:", sim.err);
    console.log("CUs consumed:", sim.unitsConsumed);
    sim.logs.forEach(log => console.log(" ", log));
}

Simulate — Python

Python
results = await client.simulate_bundle(transactions)
for sim in results:
    if sim.err:
        print(f"Simulation error: {sim.err}")
    print(f"CUs consumed: {sim.units_consumed}")
    for log in sim.logs:
        print(f"  {log}")

Tip Wallet Discovery

Get available senders and their tip wallets via the SDK.

Discover Tips — Rust

Rust
let senders = client.get_senders().await?;
for sender in &senders {
    println!("{}: {} tip wallets", sender.display_name, sender.tip_wallets.len());
    for tier in &sender.tip_tiers {
        println!("  {} — {} SOL, ~{}ms latency",
            tier.name, tier.amount_sol, tier.expected_latency_ms);
    }
}

Discover Tips — TypeScript

TypeScript
const senders = await client.getSenders();
for (const sender of senders) {
    console.log(`${sender.displayName}: ${sender.tipWallets.length} tip wallets`);
    for (const tier of sender.tipTiers) {
        console.log(`  ${tier.name} — ${tier.amountSol} SOL, ~${tier.expectedLatencyMs}ms`);
    }
}

Next Steps