Creates a low-level DCA helper from a configured AftermathApi.
Provider containing the DCA package and object addresses.
ReadonlyaddressesPackage and shared-object addresses required by DCA transactions and events.
ReadonlyeventFully qualified event types for the DCA event versions exposed by this API.
Type of the order-closed event.
Type of the version-one order-created event.
Type of the version-two order-created event.
Type of the executed-trade event.
Appends the DCA close_order Move call to a transaction.
This method only mutates the supplied transaction. It does not make a
network request, sign the transaction, or execute it. Pass the order ID
as a string to create an object argument, or pass an existing
TransactionArgument when composing a larger transaction.
Transaction, coin type arguments, and the DCA order ID.
The Move-call result appended to inputs.tx.
import { Transaction } from "@mysten/sui/transactions";
import { DcaApi, type AftermathApi } from "aftermath-ts-sdk";
declare const aftermathApi: AftermathApi;
const api = new DcaApi(aftermathApi);
const tx = new Transaction();
api.createCloseOrderTx({
tx,
allocateCoinType: "0x2::sui::SUI",
buyCoinType: "0xcoin::asset::COIN",
orderId: "0xorder",
});
Provides the low-level on-chain helpers used by the DCA package.
The class reads DCA package addresses from
AftermathApiand builds Move arguments or event type strings. It does not send HTTP requests or submit transactions.