Trading Automation
Trading Automation covers both trading workflows (SDK-first integrations) and bots (automation and keepers). It’s the single home for the trader/bot target group.
- Keeper bots: protocol maintenance (matching, triggers, liquidations).
- Trading bots: profit-seeking strategies (e.g. JIT market making).
The reference implementation for keeper bots lives in keeper-bots-v2 , and most examples below follow that repo’s config + entrypoint pattern.
Pick your path
Trading workflows (SDK-first):
Keeper bots (protocol-critical):
| Bot Type | Difficulty | Capital Required | Rewards | Link |
|---|---|---|---|---|
| Matching Bot | Basic | No | TBD | Tutorial: Order Matching Bot |
| Order Trigger | Basic | No | TBD | Tutorial: Order Trigger Bot |
| Liquidator | Advanced | Yes | TBD | Tutorial: Liquidation Bot |
Trading bots (strategy-driven):
| Bot Type | Difficulty | Capital Required | Rewards | Link |
|---|---|---|---|---|
| JIT Maker Bot | Advanced | Yes | TBD | Tutorial: JIT Maker Bot |
Prepare environment + wallet
All bots require a funded wallet for fees, and some require collateral. Use a bot wallet setup, and keep the keypair secure:
Configure the bot
keeper-bots-v2 uses a YAML config (see example.config.yaml in the repo). At minimum, set:
global.endpoint(RPC URL)global.keeperPrivateKey(keypair or env var)enabledBots+ correspondingbotConfigs
Initialize a Drift user (if needed)
Bots that place orders or manage positions require a Drift user account. In keeper-bots-v2, you can use the built-in flag:
yarn run dev --init-userRun and monitor
Start the process with your config:
yarn run dev --config-file=example.config.yamlMonitor logs for resubscribe messages and track your RPC latency. Some deployments also expose Prometheus metrics.
Troubleshoot common issues
Common issues (missing USDC ATA, user not initialized, RPC limits) are covered in: