Order Types
This page describes the various types of order types on All-In.
Limit Orders
Limit orders are stored on the book, where they await to be filled by incoming market orders. Makers can specify base amount, price, and a bid/ask flag, and a reduce-only flag. A bid must be placed below the best ask, and an ask must be placed above the best bid. A reduce-only order is an order that must result in a decrease or close for a maker. This is asserted on order creation, but if a maker partially closes before the reduce-only is filled, then the reduce-only order will be bounded by the position size before being filled. If the maker fully closes before the reduce-only order is filled, then the reduce-only order will be deleted automatically. There is a 5 USDB min order requirement for limit orders. Reduce-only orders require no collateral to post, but maker's can only have one posted at a time. Filled maker orders earn maker fees.
Trigger Orders
Trigger orders are an approval for a market close to be executed by a 3rd party (a keeper) in the future. Takers can define a trigger order with base amount, quote limit, price, and a stop-loss / take-profit flag. The rules for a Yes take-profit is the best bid must be below the trigger price, for a Yes stop-loss the best bid must be above the trigger price, for a No take-profit the best ask must be above the trigger price, for a No stop-loss the best ask must be below the trigger price. If a trigger order meets these rules on order creation, it is a market order, and it will revert. Takers must pay keeper fees on top of the protocol fee on a successful trigger order fill.
Market Orders
The two market orders are Open (which can also be used for closes) and Close (which asserts that the taker has enough of a position to close). Market orders begin filling at the best bid or ask, and will continue filling until either the order or book liquidity is exhausted. Takers define a base amount, quote limit (optional), and opens contain a yes/no flag which determines the direction of the trade. On a Yes directional trade (Yes open or No close), if a defined quote limit is exceeded the trade will revert. On a No directional trade (No open or Yes close), if the quote limit is unmet, the trade will revert. If the quote limit is left as 0, it's ignored. With base amount & quote limit, traders can define collateral they wish to trade with. Market orders pay protocol fees.
Last updated