Order basics
In this article, we will introduce a concept of internal and external orders, as well as review the key order parameters and their impact on the order life cycle.
Long story short
There are two "sorts" of orders on the BP:
Internal orders: Initial orders placed and accessible by traders.
External orders: Orders placed by the BP on the side of an LP to fulfill the initial orders (A-Book). They are only visible to the Admin and depend on the configuration of the initial orders. Partial or full execution of the external orders affects the state of the initial order.
For limit orders, the retry policy is available by implementing the TTL (time to live) parameter. It helps avoid any technical issues preventing external orders from being executed.
Order essentials
At the moment, the BP supports the following order types:
Market: An instruction to instantly buy or sell a certain asset amount at a currently best price on the market. Such orders are not listed in the order book.
Limit: An instruction to buy or sell a certain asset amount at a specified price. Limit orders are placed in the order book and executed only after the market price reaches the specified limit price (or at a better price).
Stop market: Such an order is not placed unless the current market price meets a specified stop (or trigger) price, after which the order is placed as a regular market order due to be executed or cancelled, depending on its time-in-force settings.
Stop limit: The order is similar to the stop market order in the sense that you need to indicate the stop price at which the order must be placed, after which it becomes a regular limit order awaiting execution at a specified limit price.
At the moment, the BP supports the following time-in-force settings:
FOK (fill-or-kill): Such orders are either filled instantly or killed (cancelled). In other words, a fill-or-kill order must be fulfilled instantly or not executed at all. FOK orders are used when partial delivery of assets isn't acceptable for any reason.
IOC (immediate-or-cancel): This setting implies that any part of an order that can't be filled instantly must be cancelled. Upon placing an IOC order, an attempt will be made to instantly execute it (in full or in part) at the best possible price, after which any remaining, unfilled part will be cancelled. If no amount is available at a specified price upon placing such order, it's cancelled instantly.
GTC (good-‘til-cancelled): The default setting applied to all limit orders. Open GTC orders are awaiting execution until they are cancelled explicitly by a trader or filled.
GTD (good-‘til-date): Can be applied to limit and stop limit orders. Such orders remain listed in the order book until a specified date or until they are cancelled by a trader. By that time the order can be partially executed.
DAY: Can be applied to limit and stop limit orders. Such orders remain listed in the order book until 23:59 of the current day or until they are cancelled by a trader. By that time the order can be partially executed.
The BP supports the following order execution models:
A-Book (Hedge, % = 100).
B-Book (Hedge, % = 0).
C-Book (Hedge, % = from 1 to 99).
For execution models explanation, refer to Routing basics.
If the original order is Market, it tries to be executed immediately.Limit orders are first placed in the and await the price trigger.Stop market and Stop limit orders wait for the price trigger (Stop price) and then are placed and executed as regular market or limit orders.
Internal vs external orders
Once an order is placed on the BP by a trader, it's registered in the system as an internal order.
If the order is executed according to , then one or more external orders are created to be placed on the side of an LP. The external orders aren't visible to traders. They also have their own separate set of statuses, allowing the Admin to track the life cycle of the order.
The number of external orders depends on the number of "attempts" to fulfill the original order on the side of an LP. With each execution of the external order, the filled and remaining amounts of the corresponding internal order are recalculated.
If the order is executed according to the , no external order is created and the original order is executed internally on the BP.

The type and time-in-force setting of the external order are determined by the parameters of the internal order.
Internal vs external order types
Market
Market
Limit
Limit
Internal vs external order time-in-force
FOK
FOK
IOC
IOC
GTC
IOC
GTD
IOC
DAY
IOC
Retry policy
In general, after sending an external order to an LP (A-Book policy), the BP awaits a response from the latter. If no response is received over a certain period of time, the BP tries to send the order again. It helps avoid order loss due to technical issues that may occur on the way between the BP and the LP or on the LP side.
Retry policy is only applicable to the GTC, GTD, and Day Limit orders.
Market orders are never resend, regardless of its time-in-force settings, as market conditions can change very quickly and, if multiple attempts are made, the order may be filled with considerable negative slippage.
To specify the delay period after which the order should be resent, the BP provides the TTL (time to live) setting.
The TTL is the sum of two values:
TTLe: The external time to live, which is the value specified by the LP along with the market list and their parameters.
TTLi: The internal time to live, which is the value specified by the Admin for a specific market. This value can be set in the range from 0 to 86,400 seconds (24 hours). If not set, the default value of 90 seconds is used.
After the TTL of an order expires, the price trigger requirements are checked once again. If the trigger is still active, the order is resent with a new external order ID. If the trigger is no longer active, the order is returned to the Internal order book until the next price trigger, after which the order is resent with a new external order ID.

Last updated
Was this helpful?