sol-trade-sdk v11: how a low-latency Solana trading bot fits together logosol-trade-sdk v11: how a low-latency Solana trading bot fits together
sol-trade-sdk is the execution end of Fnzero's open-source bot stack: solana-streamer and sol-parser-sdk turn gRPC or ShredStream data into events, and the trade SDK turns those events into signed transactions sent through several landing services at once. v11 (3 November 2026) is a dependency-alignment major: parser 0.11, streamer 6.0 and a new Go module path.
devrels.xyz/a/401Most Solana trading bots have the same four parts. They listen to the chain, decode what happened, decide what to do, and land a transaction before the price moves. sol-trade-sdk from Fnzero is the last part. It builds, signs and submits swaps for PumpFun, PumpSwap, Bonk (LaunchLab), StonkFun, Raydium AMM v4, Raydium CPMM and Meteora DAMM v2. It can send the same signed trade through several landing services at once: Jito, Helius Sender, Temporal, BlockRazor, Astralane, NextBlock and others. The Rust crate is MIT-licensed, has about 360 GitHub stars, and there are ports for Go, Node.js and Python.
This piece explains how the stack fits together, shows a small Rust example that we compiled against sol-trade-sdk 11.0.1, covers what changed from v10 to v11, and lists the risks. It is not a recommendation to run a sniper bot. Everything here comes from the repo, its release notes and the published crates and packages as of 23 November 2026.
The stack: stream, parse, route, submit
Fnzero ships the pieces as separate, independently versioned repos. The low-latency bot checklist describes how they connect:
- Stream. solana-streamer (crate
solana-streamer-sdk, now 6.0.0) subscribes to Yellowstone gRPC or Jito ShredStream. ShredStream is earlier but less complete; gRPC is later but has full transactions. - Parse. sol-parser-sdk (now 0.11.0) turns transactions and account updates into typed DEX events: a PumpFun trade, a pool update, a token creation. It does no RPC calls.
- Route and decide. Your code keeps a cache of pool state, filters and de-duplicates events, and decides to trade. The trade SDK has optional helpers here: cached quotes, PumpSwap multi-hop routing over registered bridge pools, and a pre-buy risk gate that can reject a mint (freeze authority, holder clusters, block lists) from local data before it builds anything. The
parser-adapterfeature connects parser events to these caches. - Submit. sol-trade-sdk builds the instructions, signs, and sends to every configured SWQoS lane plus the default RPC lane in parallel. It can return when the first lane accepts.
The checklist gives the hot path as one line:
filter -> deduplicate -> reject stale event -> map post-trade state -> Simple*Params -> sign -> submitThe main design rule is that the trade path never calls RPC. You pass in a recent blockhash (or a durable nonce) and the pool state. The SDK does not fetch them. Client creation, blockhash refresh, ATA creation and lookup tables all happen in a warm-up or background task. The docs say this directly: if your submit or confirm step takes hundreds of milliseconds, the cause is the network or your fees, not local instruction building.
A minimal example
This is the high-level API (SimpleBuyParams and buy_simple), cut down from the repo's simple_trading example. It reads PumpFun state once by RPC to stay short; a real bot gets that state from the stream. It only simulates. We compiled it against sol-trade-sdk = "=11.0.1", solana-sdk 4.0.1 and solana-commitment-config 3.1.1. We did not run it on mainnet.
use std::{str::FromStr, sync::Arc};
use sol_trade_sdk::{
common::{keypair::load_keypair_from_env, GasFeeStrategy, TradeConfig},
swqos::SwqosConfig,
trading::{
core::params::{DexParamEnum, PumpFunParams},
factory::DexType,
},
AccountPolicy, BuyAmount, SimpleBuyParams, SolanaTrade, TradeTokenType,
};
use solana_commitment_config::CommitmentConfig;
use solana_sdk::pubkey::Pubkey;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Secrets and endpoints come from the environment. Never hard-code them.
let payer = load_keypair_from_env("PRIVATE_KEY")?;
let rpc_url = std::env::var("RPC_URL")?;
let mint = Pubkey::from_str(&std::env::var("MINT")?)?;
// 1. Warm-up: create the client once, before you listen to any events.
let lanes = vec![SwqosConfig::Default(rpc_url.clone())];
let config = TradeConfig::builder(rpc_url, lanes, CommitmentConfig::processed()).build();
let client = SolanaTrade::new(Arc::new(payer), config).await;
// 2. Protocol state and blockhash. A real bot gets these from a stream
// and a background cache. This example reads them once by RPC.
let rpc = &client.infrastructure.rpc;
let pump = PumpFunParams::from_mint_by_rpc(rpc, &mint).await?;
let blockhash = rpc.get_latest_blockhash().await?;
// 3. Fees: CU limit buy/sell, CU price buy/sell, tip in SOL buy/sell.
let gas = GasFeeStrategy::new();
gas.set_global_fee_strategy(150_000, 150_000, 500_000, 500_000, 0.001, 0.001);
// 4. Intent: spend at most 0.01 SOL, 3% slippage, simulate only.
let buy = SimpleBuyParams::new(
DexType::PumpFun,
TradeTokenType::SOL,
mint,
BuyAmount::WithMaxInput { quote_amount: 10_000_000 },
DexParamEnum::PumpFun(pump),
blockhash,
gas,
)
.slippage_basis_points(300)
.account_policy(AccountPolicy::Auto)
.simulate(true);
// 5. Build, sign and simulate. Remove .simulate(true) to submit.
let (ok, signatures, error, _timings) = client.buy_simple(buy).await?;
println!("ok={ok} signatures={signatures:?} error={error:?}");
Ok(())
}RPC_URL="$RPC_URL" PRIVATE_KEY="$PRIVATE_KEY" MINT=<pumpfun-mint> cargo runSome notes on what the example shows:
- Lanes.
SwqosConfig::Default(rpc_url)is a plain RPC send. To add Jito, pushSwqosConfig::Jito(uuid, SwqosRegion::Frankfurt, None, None). In the 11.0.1 source most variants are(api_key, region, custom_url, min_tip_sol), and Node1, BlockRazor, Astralane, LunarLander, Glaive and Helius take one extra option (transport, or Helius's SWQoS-only flag). Some README snippets are behind the source (for example aSpeedLandingvariant with three arguments; the enum hasSpeedlandingwith four), so checksrc/swqos/mod.rs. - Fees and duplicates. The tip values go to each provider's tip account, and priority fees apply even when the swap fails. Each lane gets its own signed variant of the trade. The docs say variants built on a recent blockhash are not mutually exclusive, so more than one can land and you can buy twice. Variants built on a durable nonce are mutually exclusive. For multi-lane sends, use
.durable_nonce(...). - Intent enums.
BuyAmount::ExactInputprotects minimum output,WithMaxInputprotects maximum cost, andExactOutputis supported only on some pools. Bots usually useAccountPolicy::HotPathMinimalto keep ATA create/close instructions out of the trade transaction. - Simulation.
.simulate(true)callssimulateTransactionwith signature checks off. The payer probably still needs enough SOL for the simulation to pass. The repo's own mainnet test suites use a separate virtual-funding helper instead.
The ports follow the same shape: TradingClient, TradeConfig, SwqosConfig and GasFeeStrategy in npm install [email protected], pip install sol-trade-sdk==11.0.1 and github.com/0xfnzero/sol-trade-sdk-golang/v11/pkg. The Rust crate is the reference; the ports have far fewer users (single- digit stars each).
v10 to v11: what the migration involves
v11.0.1 (3 November 2026) is a coordinated family release. The trade SDK in all four languages moved to 11.0.1 on the same day as sol-parser-sdk 0.11.0 and solana-streamer 6.0.0. The release notes say routing behaviour and V1/V2/V3 instruction selection are unchanged, and Node.js and Python get no new trading behaviour. It is a major version because a public dependency changed.
What to change:
- Rust with
parser-adapter: bump your directsol-parser-sdkdependency to 0.11.0. Types from 0.10 and 0.11 are distinct, so a mismatch fails to compile. - Parser 0.11 itself:
TradeParseStatus,PumpFunParseStatusand theparse_statusfields are gone. Usethird_programto see wrapper provenance. Custom ALT resolvers take an expanded context, and Node consumers need@solana/web3.js1.99+ for V1 decoding. - Streamer 6.0: remove
parse_statususage and initialise the new creation-event fields (transaction version, ALT keys) in struct literals, or useDefault. - Go: the module path changes.
# go.mod and every import: /v10 -> /v11
# import soltradesdk "github.com/0xfnzero/sol-trade-sdk-golang/v11/pkg"
go get github.com/0xfnzero/sol-trade-sdk-golang/[email protected]
go mod tidy[dependencies]
sol-trade-sdk = { version = "=11.0.1", features = ["parser-adapter"] }
sol-parser-sdk = "=0.11.0"If you are coming from v9, v10 (26 October) also added buy_execution and sell_execution fields to the Pump quote-route structs, for the new Auto / Official / Sequential route modes. Struct literals must set them or use ..Default::default().
One more thing to watch. On 22 November Fnzero pushed a fix to main that rotates Pump.fun and PumpSwap protocol fee recipients, after a Pump announcement that says the old recipients expire on 25 November. As of 23 November that fix is not in a tagged release; crates.io still has 11.0.1 from 3 November. If you trade Pump pools, check for a newer release (or pin the git commit) before then.
Risks
- MEV and failed trades. Sniping and copy trading compete with other bots for the same slot. Tips and priority fees are paid when you lose; slippage and stale state cost money when you "win". The README says the SDK's
mev_protectionflag only applies to Astralane, BlockRazor and Glaive. The docs tell you to refresh state and rebuild within a bounded retry policy, and never to usemin_out = 0. - Key handling. The examples load a base58 secret key from
PRIVATE_KEY. That is a hot wallet. Fund it only with what you will lose, keep it apart from treasury keys, and keepRPC_URLand lane API keys in a secret store, not in the repo. - Third-party code that signs. This SDK constructs every account meta it signs, including fee and tip recipients that are hard-coded in the source. A quick search of the Rust source found no SDK-level fee or telemetry, but that is not an audit, and the npm, PyPI and Go ports are separate code bases. Pin exact versions, read diffs before you upgrade, and simulate first.
- Release speed. The crate went from 5.0.6 (2 October) to 11.0.1 (3 November): six major versions in about a month. Majors here often mean a small breaking change, but you must still read every release note.
- Licence. The Rust trade SDK, parser and streamer repos have MIT licence files (copyright MiracleAI-Labs). The Node.js, Python and Go trade SDK repos declare MIT in their package metadata but have no LICENSE file in the repo. If that matters to your legal team, ask Fnzero to add one.
- Scope. This is memecoin and launchpad execution tooling. There is no Jupiter-style aggregation across every venue, and the third-party landing services each have their own terms, regions and minimum tips.
When to use it
Use it if you already know you need sub-RPC-latency execution on Pump, LaunchLab, Raydium or Meteora pools and you would otherwise write the instruction builders, fee-recipient logic and multi-lane submission yourself. The good parts are a strict no-RPC hot path, clear intent enums, and release notes that say what they validated (and that no live trade was broadcast). If you only need a good price for a user swap, an aggregator API is simpler and safer.
Sources
- 0xfnzero/sol-trade-sdk, v11.0.1 release, RELEASE_NOTES.md, LOW_LATENCY_BOTS.md, GAS_FEE_STRATEGY.md, TRADING_PARAMETERS.md
- v10.0.0 release, sol-parser-sdk 0.11.0, solana-streamer 6.0.0
- Ports: Go, Node.js, Python; crates.io, npm, PyPI
- fnzero.dev, sol-trade-sdk on devrels.xyz, Fnzero on devrels.xyz
- Maintainers on GitHub: Wood (0xfnzero) (profile) and sgxiang (profile). We found no verifiable X or LinkedIn accounts for Fnzero or its maintainers.
Keep reading
Operators vote on a meta merkle root each epoch. After two thirds of restaked stake weight agree, crankers set validator roots and anyone with a proof can claim.
Atomic multi-tx execution on Solana is not a protocol feature — it is a Jito auction you bid into with tips.
If you only track “fees,” you undercount what the block producers actually make — and you misread the auction users are really in.
Get new articles in your inbox
Technical deep-dives on Solana tooling, infrastructure, and ecosystem. No noise.
