For the complete documentation index, see llms.txt. This page is also available as Markdown.
Open Dca Order
Core Workflow
Opening a DCA order requires two steps:
Fetch a signed quote from the Cetus DCA Quote API. The response provides fee_rate, per_cycle_in_amount_limit, timestamp, and signature, which the on-chain contract validates before accepting the order.
Build and submit the open-order transaction via sdk.Dca.dcaOpenOrderPayload().
User wallet βββΊ Quote API βββΊ signed quote βββΊ dcaOpenOrderPayload βββΊ Sui transaction
Quote API (Signature)
Before calling dcaOpenOrderPayload, request a quote from the Cetus backend. The server signs order constraints (input coin, cycle frequency, cycle count, and per-cycle input cap). The contract rejects orders with invalid or expired signatures.
Endpoint
GET https://api-sui.cetus.zone/dca/quote
Query parameters
Parameter
Type
Required
Description
in_coin
string
Yes
Full Move type of the input (pay) coin, e.g. 0x2::sui::SUI or normalized long-form address
freq
number
Yes
Cycle interval in seconds (must meet on-chain min_cycle_frequency; see Global Config)
count
number
Yes
Total number of execution cycles (must meet on-chain min_cycle_count)
sender
string
Yes
Sui address of the order creator (same as sdk.setSenderAddress)
Maximum input amount allowed per cycle (base units)
timestamp
timestamp
Quote expiry timestamp (Unix seconds); must be used before it expires
signature
signature
Backend signature authorizing the quote parameters
Fetch quote in TypeScript
Note: Quotes are time-bound. Fetch a fresh quote immediately before building the transaction. Reusing an expired timestamp or signature will cause the on-chain call to fail.
Open DCA Order
Parameter overview
Parameter
Type
Description
in_coin_type
string
Input coin Move type (coin deposited into the DCA order)
out_coin_type
string
Output coin Move type (coin received each cycle via swap)
in_coin_amount
string
Total input amount to deposit, in base units (integer string)
cycle_frequency
number
Seconds between each swap execution
cycle_count
number
Number of cycles; in_coin_amount is split evenly across cycles
per_cycle_min_out_amount
string
Minimum acceptable output per cycle (base units); swap reverts if output is below this
per_cycle_max_out_amount
string
Maximum acceptable output per cycle (base units); used as slippage upper bound
per_cycle_in_amount_limit
string
From quote API amount_in_limit_per_cycle; caps input spent per cycle
fee_rate
number
From quote API
timestamp
number
From quote API
signature
string
From quote API
Slippage bounds (per_cycle_min/max_out_amount)
These define the acceptable swap output range per cycle. A common approach:
Compute human-readable input per cycle: in_coin_amount / 10^inDecimals / cycle_count