DCA Agent Walkthrough
This walkthrough is based on examples/dca-agent.
Strategy shape
Section titled “Strategy shape”name: dca-sol-weeklychain: solana-mainnetsteps: - id: buy-sol type: action action: type: swap inputToken: USDC outputToken: SOL amount: "10000000" amountUsd: 10 repeat: intervalMs: 604800000 maxRepeats: 52Run the demo
Section titled “Run the demo”pnpm --filter @stendar/example-dca-agent demoIf SOLANA_RPC_URL and WALLET_PRIVATE_KEY are present, the demo starts a dry-run runtime and executes one shortened repeat cycle.
What to observe
Section titled “What to observe”- strategy parsing from YAML
strategy:step_started/strategy:step_completedevents- final strategy status from
StrategyEngine#getStatus
See Strategies for step semantics and lifecycle.