Trades are executed on the exchange by matching orders between buyers and sellers. When a customer creates a trade they are either:
- Buying from the sell order book, or selling into the buy order book. Buying/selling at current market value will take liquidity away from the order books.
- Creating liquidity within the order books by creating limit orders. Creating an order for execution at a differing price from current market value will add liquidity to the order books.
Providing liquidity to the order book means that you are functioning in a maker fashion, while removing liquidity from the order book means you are functioning as a taker, hence the Maker/Taker fee structure.
Market Buy Orders
The order books and current market value are always fluctuating. When creating a market buy or sell (buying over or selling under current market value), your order will execute immediately, so long as there is liquidity available to fulfill your entire order. This happens as you are attempting to buy/sell outside of the current market rates - not adding liquidity to the book, but instead taking from it.
Open Orders
If your order is not fully executed due to lack of liquidity, an open order will be created, which in turn adds liquidity to the order books. Orders remain open if they have not yet been fulfilled. When you set an order for a certain quantity of a coin at a certain price, there have to be counter-parties available who are willing to trade with you at that price and quantity. If there are not enough coins available at that price, the order remains open until there are enough coins at that price to fill your entire order. Please be advised that these orders will remain open until the parameters that you have set have been met in order for the full order to be completed. You can review or cancel your current open orders here.
If your order is split into multiple orders, the executed part of the order will be charged a taker fee, while the non-executed part of the order (the amount adding liquidity to the order book) would be charged a maker fee once executed at a later time (so long as you don't cancel the open order before it is filled).
Order Books and Execution
When orders are entered to the order book they will be executed based on the market requirements. In a buy situation, the lowest ask will be selected first, and in a sell situation the highest bid will selected first.
Order books are filled with many orders, set at different prices, for different amounts, which creates market liquidity within the order book. A large amount of orders and assets creates a large, rich, liquid order book. This type of order book can be seen on an asset such as BTC, which is the most traded coin.
When an order book has multiple entries for the same price it will show a combined value of orders based at that price point.
For example, if 5 people all want to sell 1 BTC at 10,000 USDC/BTC, the order book would show a price of 10,000 USDC, an amount of 5 BTC, a value of 50,000, for a summed total of 50,000 USDC. If a customer would like to purchase 1 BTC at 10,000 USDC/BTC, the trade engine will match the buyer to the first input order within that price range.
This is known as price-time priority, meaning orders of the same value will be executed based on the time they entered the order book. This is also known as a first in-first out order execution method, or FIFO for short. In other words, the oldest order (first in) will become the first order out, or sold (first out). This would also mean that if you were the fifth order entry of 1 BTC at 10,000 USDC/BTC your order would be the last out in the selling process, should the entirety of the 5 BTC be purchased amongst customers. This principle explained in the example above is also applied to buy orders.
We hope that these explanations and the principles presented will help you along your way to understanding trading and becoming the best trader you can be! Please feel free to reach out to us at any time should you have any additional questions that were not addressed.
Happy trading!