Recurring Buy
Create DCA Order
Generate calldata to create a dollar-cost averaging order on-chain
POST
Overview
Creates a DCA (Dollar-Cost Averaging) order that automatically executes recurring swaps at specified intervals. Each order is deployed as a dedicated smart contract that manages your funds and executes trades autonomously.Request
Address that will own the DCA order
Token to sell over time
Total amount to sell across all cycles
Amount to sell in each cycle
Token to purchase
ISO 8601 duration format (e.g., “P1D” for daily, “PT12H” for 12 hours)
PT1H- Every hourPT6H- Every 6 hoursP1D- DailyP1W- WeeklyP1M- Monthly
ISO 8601 start date (defaults to now)
Price constraints for order execution
Response
Network identifier (e.g., “0x534e5f4d41494e”)
Array of transaction calls to create the order
Order Calculation
Number of cycles = Total Amount ÷ Amount Per CycleDuration = Number of Cycles × FrequencyExample: 1 ETH total, 0.1 ETH per cycle, daily frequency = 10 days duration