Mainnet currently supports Spot DEX only. Perpetuals, Oracle, Margin Trading, Lending, and Vaults are Testnet-Only. Use Testnet endpoints and assets for those products.
Use an SDK version with the required message builder and EIP-712 support. The
SDK trading support table shows which features have verified Python 0.9 methods and which need native messages. TypeScript and Python support can differ.
Prerequisites
- A trading account opened on Ault Core. See Open Account with Fee.
- Collateral on the Core side. See Transfer Assets.
- Order messages carry a fee-free gas allowance, so
AULTis needed only past it. See Fee-Free Gas. - The market’s
precisionfrom Markets & Currencies, and the module constraints below.
Messages
The modify message is plural, so several orders can be repriced or resized in a single transaction.
Missing IDs can be returned as failed items while other modifications proceed. A different
validation error can reject the batch, and a batch with no valid modifications is rejected.
Do not list the same live order twice in one modify batch. Inspect its committed response rather
than assuming one successful transaction changed every input.
Order Attributes
An order on the book carries these attributes:Every order carries a deadline. There is no open-ended resting order, so a long-lived quote needs a
deadline far out, capped by
max_order_lifespan below, and replacement before it expires.Protocol Constraints
Read the native market and product parameters before building orders. The Spot REST market response provides display metadata, but its compatibility fields do not replace these validators:
The CLOB parameter named
min_order_quote_amount is deprecated in V3. Query the owning product’s
parameter instead. Chain Queries
lists the routes. The response below illustrates the older CLOB shape; its sample numbers are not
the current Spot or Perpetual minimum:
limits.cost.min or a universal 18-decimal quote asset.
Convert the product’s canonical amounts using its token and market units. Minimum executable base quantity is another requirement. An order can pass the limits shown by REST and still be rejected. Use decimal arithmetic within the SDK’s supported numeric range.
Tick examples
For positive priceP and native tick_precision = p, the grid step in its price decade is
10^(floor(log10(P)) - p). A limit price must be an exact multiple of that step.
For a hypothetical market with p = 2:
Use decimal arithmetic and the native grid, including at a power-of-ten boundary. The examples
describe price validation, not a contract’s quantity unit or an active market’s parameters.
Price Protection
For a Spot market order, letL be the local last trade and t the supplied price_tolerance, or
max_order_price_ratio when omitted. A supplied tolerance must be positive and no greater than
the configured maximum. The allowed interval is [L * (1 - t), L * (1 + t)].
- A buy defaults to the upper bound. An explicit
worst_priceabove it is clamped to that bound; a value below the lower bound is rejected. - A sell defaults to the lower bound. An explicit
worst_pricebelow it is clamped to that bound; a value above the upper bound is rejected. - The executable buy bound rounds down to a valid tick; the sell bound rounds up. No last trade means a Spot market order is rejected.
L = 100 and t = 0.02, a buy with worst_price = 105 is bounded at 102, while
one with worst_price = 97 is rejected. These are hypothetical inputs, not a live tolerance.
The parameter does not impose this same band on every ordinary limit order. Perpetual immediate
execution uses an IOC limit’s explicit price instead of this generic market instruction.
Client Order IDs
A client order id is 8 bytes. Supplying one lets you find the order without waiting for the chain-assigned id. This API reports it as 16 hex characters, asclientOrderId on
Orders. The chain query takes the same 8 bytes base64-encoded, not the hex
form:
400 cloid must be 8 bytes, got 12.
Modifying
Price and quantity can change on an order that is still resting. Attributes fixed at placement, such as side and market, require a new order. A client order id cannot be changed by a modify. An order that has already filled, expired, or been cancelled cannot be modified.What Changes Depends on the Field
Partially Filled Orders
A partially filled order’snew_quantity is the new total quantity, including previous fills.
For example, after 3 of 10 base units fill, setting it to 5 leaves 2 open; setting it to 12 leaves 9
open. filled, remaining, and
info.remaining_deposit on Orders show what is left, where
info.remaining_deposit is the escrow still held.
Reducing the target to the filled amount or below closes the order. The native modify path also
closes the order if the remaining quantity would be one smallest base unit or less. Read filled
before sizing a reduction. A pure reprice without new_quantity retains the previous open size.
Modify or Cancel and Replace
Prefer modify when only price or quantity changes. Even for a reprice, where both approaches produce
a new order id, modify does it in one transaction and leaves no window in which the account has no
order on the book.
Confirming the Result
A successful broadcast means the transaction was accepted, not that the order rested. The chain can reject orders for off-tick prices, insufficient funds or margin, a product minimum, halted markets, order capacity, orcloid conflicts. State can change between acceptance and execution. Inspect both the committed transaction code and each batch result; a successful
transaction does not mean that every requested modification succeeded.
Confirm through one of:
- The transaction result and its events.
- The
orderUpdateschannel on Subscriptions, matched onoidHexorcloid. - A read of Orders, where
info.chain_statuscarries the granular status.
Next
Cancel Order
Remove a resting order and release its escrow.