Order book, spread and slippage: what happens to a bot’s order
The price on the chart is the price of the last trade. You cannot always buy or sell at it right now. What you actually get is decided by the order book.
The order book
The order book is the list of orders standing on the exchange right now: buyers with their prices on one side, sellers on the other. The buyers’ best price is always below the sellers’ best price.
The spread
The gap between those two prices is the spread. On a large pair it is very small; on a little-known coin it can be noticeable. The spread is paid by whoever needs the trade at once: you can buy straight away only at the sellers’ price, and sell only at the buyers’.
Market and limit orders
- Market: “buy now at whatever the price is”. It fills at once, but the price is not yours to set.
- Limit: “buy at no more than this price”. The price is yours to set, but the order may not fill.
Slippage
Each price in the book has a limited amount standing at it. If a market order is larger than what is there at the best price, it takes the next levels — each worse than the one before. The gap between the price you counted on and the average price you got is slippage. The thinner the book and the larger the order, the more of it there is.
How a Nexora bot places its orders
- The bot does not keep orders standing in the book ahead of time. It watches the price and sends an order at the moment the price reaches a level.
- That is a limit order on the condition “fill it whole or cancel it”: a buy at no more than the price the rung settled on, a sale at no less than the target.
- If the book did not hold enough at that price, the order is cancelled whole and the bot tries again.
- The exceptions are a grid’s first buy on start, a DCA bot’s purchases and the “Sell position” button. Those are market orders: they carry no price.
What follows from that
- The exchange’s list of open orders usually shows none of the bot’s: they are not there until the price reaches a level.
- USDT is not frozen for purchases to come: the free balance stays free.
- On an illiquid pair a bot may stand still although the price on the chart went through the level: the book did not hold the amount at the price.
- In paper mode a market buy also goes through the real order book and pays slippage.
Trading cryptocurrency carries a high risk and may result in the partial or total loss of funds. Nothing on this site is investment advice. Nexora is software, not a broker or an asset manager.