Skip to Content
DevelopersTrading AutomationTrading Automation

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 TypeDifficultyCapital RequiredRewardsLink
Matching BotBasicNoTBDTutorial: Order Matching Bot
Order TriggerBasicNoTBDTutorial: Order Trigger Bot
LiquidatorAdvancedYesTBDTutorial: Liquidation Bot

Trading bots (strategy-driven):

Bot TypeDifficultyCapital RequiredRewardsLink
JIT Maker BotAdvancedYesTBDTutorial: 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 + corresponding botConfigs

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-user

Run and monitor

Start the process with your config:

bun run dev --config-file=example.config.yaml

Monitor 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:

Last updated on