Skip to content

DCA Agent Walkthrough

This walkthrough is based on examples/dca-agent.

name: dca-sol-weekly
chain: solana-mainnet
steps:
- id: buy-sol
type: action
action:
type: swap
inputToken: USDC
outputToken: SOL
amount: "10000000"
amountUsd: 10
repeat:
intervalMs: 604800000
maxRepeats: 52
Terminal window
pnpm --filter @stendar/example-dca-agent demo

If SOLANA_RPC_URL and WALLET_PRIVATE_KEY are present, the demo starts a dry-run runtime and executes one shortened repeat cycle.

  • strategy parsing from YAML
  • strategy:step_started / strategy:step_completed events
  • final strategy status from StrategyEngine#getStatus

See Strategies for step semantics and lifecycle.