Limit Orders

Description

A Limit Order is an order to buy or sell a stated quantity at a price better or equal to a specified limit price.


When a Limit Order is placed in the market, it will attempt to fill against resting orders up to the specified limit price. If the order doesn’t fully fill, the full or remaining order will rest in the order book at the limit price until it fills.


This order type is supported for all tradable products ErisX offers.


Examples

Let’s assume the order book for BTC/USD looks like the order book below:



  • Example A: User places a Limit Order to buy 2 BTC at a limit price of 51,430. Since there are no offers at a price of 51,430 or lower, the full buy order sent by the user posts in the order book, setting a new best bid, and resting until it gets filled or canceled.

  • Example B: User places a Limit Order to buy 2 BTC at a limit price of 51,500. Since there are offers at a price of 51,500 or lower, the order will start to fill at the best available price. Therefore, the order “crosses the spread” to match with posted sell orders and the user purchases 1.4578 BTC at a price of 51,447.2 and 0.5422 BTC at a price of 51,452.4. The order is now fully filled.

  • Example C: User places a Limit Order to sell 2 BTC at a limit price of 51,428. Since there are bids at a price of 51,428 or higher, the order will start to fill at the best available price. Therefore, the order “crosses the spread” to match with posted buy orders and the user sells 1.4295 BTC at a price of 51,429.3. However, there are no remaining bids at or above the sell limit of 51,428 to fill the rest of the order at a price equal to or better than the limit price.Therefore, the remaining sell order quantity of 0.5705 BTC will post in the order book at a price 51,428, setting a  new best offer, and resting until it fully fills or gets canceled.


Stop-Limit Orders

Description

A Stop-Limit Order is an order that combines the features of a Stop Order and a Limit Order. A specified Stop Price acts as a trigger to enter a Limit Order into the market. 


When placing a Stop-Limit Orders, the user needs to specify three parameters: Stop Price, Limit Price, and quantity. The last trade price in the relevant asset acts as the trigger for Stop Limit Orders.

  • Stop Price - This is the trigger price for the stop order to be activated.  

  • Limit Price - This is the price  that the Stop order will be entered at.

  • Quantity - the amount in units of the Asset for the order.


Stop Orders trigger logic:

  • For Buy orders, when a trade occurs at a price equal or greater than the Stop Price a Buy Limit Order will be entered into the market at the specified Limit Price and for the specified quantity.

  • For Sell orders, when a trade occurs at a price equal or lower than the Stop Price a Sell Limit Order will be entered into the market at the specified Limit Price and for the specified quantity.

Input Validations

In order for a Stop-Limit Order to be valid and accepted by the exchange, the following conditions need to be met:

  • For Buy orders:

    • The Stop Price must be higher than the last traded price.

    • The Limit Price must be higher than the Stop Price.

  • For Sell orders:

    • The Stop Price must be lower than the last traded price.

    • The Limit Price must be lower than the Stop Price.


Examples

Let’s assume that the last trade in BTC/USD occurred at a price of 51,000.

  • Example A: User places a Stop-Limit Order to Buy 1 BTC with Stop Price = 51,500 and Limit Price = 51,550. The order contains a Stop Price and Limit Price greater than the last traded price. These are valid inputs so it will be accepted by the exchange. The Stop-Limit Order will remain “dormant” until a trade occurs at a price of 51,500 of higher. If the BTC/USD price moves up and a trade occurs at 51,510, the Stop Price will be met, triggering the Stop-Limit Order. Automatically and immediately after the trade at 51,510,  the Stop Limit will place a Buy Limit Order for quantity 1 BTC at a price of 51,550 (the Limit Price).

  • Example B: User places a Stop-Limit Order to Sell 1 BTC with Stop Price = 50,000 and Limit Price = 49,990. The order contains a Stop Price and Limit Price less than the last traded price. These are valid inputs so it will be accepted by the exchange. The Stop-Limit Order will remain “dormant” until a trade occurs at a price of 50,000 or lower. If the BTC/USD price moves down and a trade occurs at 50,000, the Stop Price will be met, triggering the Stop-Limit Order. Automatically and immediately after the trade at 50,000 the Stop Limit will place a Sell Limit Order for quantity 1 BTC at a price of 49,990.


ErisX Market Orders With Protection

Description

An ErisX Market Order With Protection is an order to buy or sell a stated amount of an asset at the prevailing best price. Users do not need to set a Limit Price for their order. Instead the system will attempt to fill the full order at the best available prices in the market. If the order cannot be fully filled, for example as a result of triggering an order protection, the system will match with eligible orders, if any, in partial fills and cancel any residual, unfilled portion.As such a Market Order may not fully fill


The fees that will be incurred when using Market Orders are calculated upon order entry (based on the prevailing best price) and included in the notional amount that you specify in your order. This ensures that you have a sufficient balance, net of fees, for the order to execute. For example, if you send an order to buy $10,000 of an asset and the fee is $20, you will not be charged $10,020. Instead the fees will be subtracted from the $10,000 and you will purchase $9,980 worth of [the asset].

How to specify quantity for Market Orders

First, we will define the following concepts:

  • Base Currency: the currency appearing first in the quotation pair - i.e. for BTC/USD the base Currency is BTC.

  • Quote currency: the currency appearing second in the quotation pair - i.e. for BTC/USD the quote currency is USD.


For a Buy Market Order, users will need to specify the quantity they want to buy in terms of the Quote Currency. For example, if you want to buy $10,000 worth of BTC at market price, you will need to enter BUY $10,000 BTC/USD. 



For a Sell Market Order, users will need to specify the quantity they want to sell in terms of the Base Currency. 

For example, if you want to sell 0.5 BTC at market price, you would need to enter SELL 0.5 BTC/USD.


Market Order Protections

Using Market Orders carries some risk. If liquidity is thin, spreads are wide, or quotes are volatile, for example, a Market Order may execute at price(s) inferior to what the user optimally intended. ErisX has implemented a set of protections for Market Orders in order to mitigate some of the inherent risks of using this order type. When selecting Market Order with Protection, two categories of protections will apply:


Market Width Protection

This protection will cause Market Orders to be rejected when the market width (bid-offer spread) is wider than a predefined percentage. It has the objective of preventing Market Orders from trading at unexpected prices as a result of temporary market dislocations during periods of volatility. For example, when market makers briefly widen out their quotes to adjust to fast-moving markets. 


Therefore, the Market Width Protection will cause Market Orders to be rejected when market width > [X]%. The  percentage value at which the Market Width Protection is set is calibrated based on analysis of historical market width per asset, and is subject to change based on market conditions.


Market Depth Protection

This protection will cancel any remaining quantity of a partially filled Market Order - when the order will require multiple fills to fully execute - if the difference between the first trade price and the price at which the next order would trade (the next trade price) would exceed a predefined percentage. It has the objective of preventing Market Orders from sweeping the order book and trading at unexpected prices as a result of temporarily thin book depth during periods of volatility. For example, when market makers are briefly out of the market as they adjust to fast moving markets.


This check takes place when a Market Order would trade against multiple price levels as it exhausts the liquidity on each level. After filling the first price level available in the market, this check will take place every time the order starts to fill at a new price level. 



The Market Order will continue to fill against the best available price levels until it either fully fills or the Market Depth > Y%, in which case the remaining unfilled quantity will be cancelled and the Market Order will only be partially filled. The percentage value at which the Market Depth Protection is set is calibrated based on analysis of historical market depth per asset, and is subject to change based on market conditions.


Examples

Let’s assume the order book for BTC/USD looks like the order book below:

  • User places a Market Order With Protection to BUY $10,000 in BTC/USD, the fee is $20 (based on a 20bps take charge) and the best offer in the market is 1.4578 BTC at $51,447.2. Then the user would be purchasing $9980 worth of BTC (net of fees) at a price of 51,447.2, i.e. 0.19398528 BTC. The minimum order precision for BTC/USD is 0.0001, hence the order placed in the market would be to buy 0.1939 BTC at $51,447.2, leaving a residual unfilled portion of 0.00008528 BTC. In summary, the user would have bought 0.1939 BTC, with a notional value of $9,775.61, and paid $20 in fees for a total notional value of $9,995.61, thus, leaving a residual $4.39 in the user’s account for future purchases.

  • User places a Market Order With Protection to SELL 2 BTC in BTC/USD. The order executes at the best available prices, thus it will sell 1.4295 at $51,429.3 and 0.5705 at $51,427.0. The total notional value of the trade amounts to $102,857.2879, the fee is $205.71458 (based on a 20bps take charge) and the user’s account is credited $102,651.5733 after fees.

Post Only Flag

Description

The Post Only flag is a feature that can be specified when entering Limit and Stop-Limit Orders. When the Post Only feature is enabled, the Limit Order will only enter the market if it will not immediately execute with another resting order already in the order book.


This feature is particularly useful when the user wants to guarantee that an order will not aggressively “cross the spread”  to avoid paying the taker fee. Instead the user is seeking to post passively and take advantage of the maker fee model.

Examples

Let’s assume the order book for BTC/USD looks like the order book below and the last traded price was 51,445.

  1. User places a Limit Order to Buy 1 BTC at a Limit price of 51,447.2 with Post Only flag enabled. If the order were to be entered into the market, it will immediately trade against the resting offer at 51,447.2, thus the order is rejected with cancellation reason: Order May Not Aggress.

  2. User places a Limit Order to Buy 1 BTC at a Limit price of 51,450 with Post Only flag enabled. If the order were to be entered into the market, it will not immediately trade, thus the order is entered into the market and rests in the order book.


Time in Force

Description

Time in Force is a special instruction specified when submitting orders that indicates how long an order will remain active before it fully fills or expires. When an order expires it will get cancelled automatically with a cancellation reason of Time in Force.

Supported Time in Force

ErisX supports the following Time in Force values:

  • Session (Day): Orders with this expiry type that have not been executed will be expired by the system at the end of the ErisX session on which they were entered. 

    • The Spot market session is continuous and only finishes when a maintenance period takes place, thus, Spot orders entered with Time in Force = Session (Day)will remain active until a maintenance window takes place.

    •  The Futures market session elapses from 5pm CT to 4pm CT on the following day.

  • Good Til Cancel (GTC): Orders with this expiry setting will remain open and active until either executed or explicitly canceled by the client.

  • Good Til Date (GTD): The submitting client specifies the date at which the order is to be expired if not already executed.

  • Fill or Kill (FOK): A Fill or Kill is an order that will either fill immediately the whole requested quantity when entering the orderbook or it will be cancelled in its entirety.

  • Immediate or Cancel (IOC): An Immediate or Cancel order is an order that will immediately fill any portion of the order that is executable and cancel any remaining quantity. This behavior is similar to Fill or Kill but an IOC order can have partial fills.

Supported Time in Force by Order Type

The following table indicates what Time in Force values are supported on each order type


Time in Force

Limit Order

Stop-Limit Order

Market Order

Can Partial Fill

Session (Day)

YES

YES

NO

YES

Good Til Cancel

YES

YES

NO

YES

Good Til Date

YES

YES

NO

YES

Fill or Kill

YES

YES

NO

NO

Immediate or Cancel

YES

YES

YES

YES


FAQ

Why didn’t my Market Order fully fill?


Market Orders may partially fill when either a Market Width Protection or Market Depth Protection is triggered. 


Additionally, a buy Market Order may result in a residual unfilled portion when the remaining quantity is smaller than the minimum order precision for a given product. 


For example, if you send a Market Order to BUY $1,000 in BTC/USD, the fee is $2 (based on a 20bps take charge) and the best offer in the market is 1 BTC at $50,000. Then you would be purchasing $998 worth of BTC (net of fees) at a price of 50,000, i.e. 0.01996 BTC. The minimum order precision for BTC/USD is 0.0001, therefore the order placed in the market would be to buy 0.0199 BTC at $50,000, leaving a residual unfilled portion of 0.00006 BTC. 


In summary, you would have bought 0.0199 BTC, with a notional value of $995, and paid $2 in fees for a total notional value of $997, thus, leaving a residual $3 in your account for future purchases.