Construct the client
BundlerOptions(provider=..., url=..., api_key=...) accepts
alchemy, pimlico, flashbots, or generic. The provider value
is informational; the actual vendor preset is chosen by the consumer
when wiring the client.
Place a trade
user_op_hash is what the signer signed — useful for log
correlation across the bundler RPC and the EntryPoint contract. The
smart-account send.buy result carries only user_op_hash and the
bundler-returned receipt; the on-chain transaction hash is nested
at result.receipt.receipt["transactionHash"] and success at
result.receipt.success. External monitoring typically wants both
views.
First-trade-with-deployment
Same auto-deploy story as the TypeScript SDK: the first UserOp from a fresh SmartAccount carriesfactory + factory_data so
the EntryPoint deploys the account in the same op. The Python SDK
auto-detects the undeployed state and populates these fields; you
don’t pass anything special. Verification gas is ~5x higher on
the deployment op, and the bundler’s gas estimate accounts for
this automatically.
Run the bundled examples
What’s next
EOA quickstart
Vanilla EIP-1559, no bundler.
Hummingbot integration
Full strategy walkthrough.