DCA
Automated Dollar-Cost Averaging (DCA) strategy to invest steadily over time, minimizing the impact of market volatility and building positions across multiple assets or pools with ease.
DCA
Fetch Orders
Active and Past Orders
Response
Active Orders
Response
Error Codes
INTERNAL
An internal error occured
STRATEGY
Coin price was not within the given strategy bounds
GAS_CAP
Gas cost for trade was too expensive
UNKNOWN_USER
An unknown error occured
Create Order
walletAddress
string
Wallet address that pays gas, owns the order, and receives money by default unless a custom recipient is set
allocateCoinType
string
Coin you allocate for trade
allocateCoinAmount
bigInt
Amount of allocated coin
buyCoinType
string
Coin you buy
frequencyMs
number
How often the trade should occur
tradesAmount
number
Number of trades into which order should be split
delayTimeMs
number
Delay timeout before trades commence
maxAllowableSlippageBps
number
Slippage tolerance
coinPerTradeAmount
bigInt
Amount of allocated coin divided by number of trades
customRecipient
string?
Optional wallet address where funds could be transferred
strategy
object?
Strategy applied to each trade execution
minPrice
bigInt
Minimum price value per trade (normalized)
maxPrice
bigInt
Maximum price value per trade (normalized)
Final minimum and maximum strategy values should be multipled by "coinPerTradeAmount". E.g. user inputs minimum price equal 1SUI ~ 2.0 wUSDC trading 10 Sui to wUSDC in 5 trades. Final minimum price will be (2.0 * 10 SUI) * decimals (wUSDC)
Code Example
Cancel Order
Signed Message Inputs
bytes
string
Bytes of signed message
signature
string
Users signature for signed message
Close DCA Order Inputs
action
string
Title shown in the pop-up for UX (CANCEL_DCA_ORDER by default)
order_object_id
string
Address of the order that needs to be closed
signedMessage
object
Message the user signs to close the order
walletAddress
string
Wallet address that owns the order
Code Example
Last updated