Order Types

For each trade on D8X, the AMM is the counterparty. The smart contract supports market orders and conditional orders with limit price and trigger price. This allows for a variety of order types. The execution of conditional orders is performed via a third party that is remunerated for their service with a fee that is paid by the trader. The order execution is processed by the smart contract only if the conditions specified in the order are met and the order is cryptographically signed by the trader.

Order TypeDescription


A regular order is executed by the smart contract at the best price

Stop orders are path independent because they can be executed only if both conditions (limit price and trigger price) are met.

Market orders and stop market orders are similar to market orders with slippage protection and stop limit orders respectively, where the limit prices are set to an extreme and the difference that market orders are "fill-or-kill".

Market with Slippage Protection

A tight limit price specified in the order protects the market order against slippage. If the limit price is not met, the order execution fails and the order is removed.


The AMM only allows for orders to be executed that result in a price better or equal to the specified limit.

Stop Limit (Path Independent)

If a trigger price is specified, the AMM only allows the trade to go through if both trigger, and limit price are met. Stop orders on D8X are path independent, that is, both conditions (trigger and limit) have to be met at the same time for the order to go through.

Stop Market (Path Independent)

The trader can specify a loose limit price in combination with a trigger price to mimic a stop market order. The trader will still get the best price available at the time the trigger is met.

Reduce Only

Traders can combine a "close-only flag" with all of the order types to ensure that the order execution leads to a smaller position size.

Fill Or Kill

Traders can add a fill or kill flag which will delete the order from the order-book if the execution failed

Time Delayed Orders

Orders can specify a time delay with a timestamp, such that the order is not executed before the block-timestamp is higher than the provided timestamp. This allows for the construction of Time-Weighted Average Price (TWAP) orders.

Last updated