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 is apps/keeper-bots-v2 in the velocity-v1 monorepo, and most examples below follow that app’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
apps/keeper-bots-v2 uses a YAML config (see example.config.yaml in the app directory). At minimum, set:
global.endpoint(RPC URL)global.keeperPrivateKey(keypair or env var)enabledBots+ correspondingbotConfigs
Initialize a Velocity user (if needed)
Bots that place orders or manage positions require a Velocity user account. From apps/keeper-bots-v2, you can use the built-in flag:
bun run dev --init-userRun and monitor
Start the process with your config:
bun 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: