A strategy decides to buy. Getting that buy done is a separate job, and it is rarely as tidy as it looked on paper. Between “buy now” and “bought” sit an order type, a queue at the exchange, a moving price, and a set of small frictions that backtests do not feel. This guide follows that journey once, slowly, because a large part of the gap between paper results and live results comes from here.

What actually happens when a bot places an order?

A small robot sending a parcel along a conveyor belt through a checkpoint arch

The bot sends a request to the exchange over the API: side (buy or sell), size, and price instructions. The exchange checks it (enough balance? valid size?) and either rejects it or accepts it into the market. From that moment the order has a life of its own: waiting in the order book (traders say “resting”), partly filled, fully filled, or canceled. The bot’s job is to track that life, because the strategy only said “buy.” It did not say what to do if the market moves away while the order waits, and somebody has to decide.

What are the basic order types, and what does each one give up?

A balance scale with a target on one side and an hourglass on the other

A limit order names a price: buy at this price or better. It gives certainty about price and none about whether, or when, it fills. The order may fill in a second, in an hour, or never.

A market order names no price: fill me now against whatever is available. It gives certainty that it fills now, and none about the price. In a calm, liquid market the cost of that is tiny. In a fast market, or a thin one with few orders waiting in the book, it can be the single biggest cost of the whole trade.

Everything else on the menu (stop orders, post-only, and the rest) is a variation on the same trade-off between price certainty and time certainty. A separate guide in this series covers the full list of order types; a first bot needs nothing more than plain limit orders.

What is slippage, and how much does it cost?

A ball that has rolled off a higher bar and settled on a slightly lower one

Slippage is the difference between the price your bot decided on and the price it actually got. It has two causes: the market moved during the delay, or your order was bigger than the best price level could absorb, so the rest filled at worse prices.

For small orders in liquid markets, slippage is a few cents: a few hundredths of a percent on a $100 order. A market order in a thin market during a fast move can slip 1% or more. It grows with order size, with market speed, and with every millisecond between decision and arrival. It also adds up quietly: a strategy that trades often pays it often, which is why the backtesting guide insists on charging a realistic spread per trade. If your live results come in below your backtest, this is one of the first places to look, next to what the backtest itself assumed about costs.

What is a partial fill, and what should the bot do about it?

A robot with a magnifying glass looking at a tray in which three of five slots are filled

A limit order for $500 can fill $180 and then sit. The strategy said “open a position”; reality delivered 36% of one. The bot must now answer questions the strategy never asked. Keep waiting? Cancel the rest? Adjust the exit size to match what actually filled?

There is no universally right answer, but there is a universally wrong one: not noticing. A bot that assumes every order fills completely will eventually try to sell more than it holds, or exit half a position and forget the rest. Always track the amount that actually filled, not the amount the bot asked for.

What happens when an order is rejected, times out, or hits a rate limit?

A robot with a magnifying glass inspecting a box that has just come out of a checkpoint arch

Orders get rejected: too small, too many decimal places in the price or size, not enough balance, market paused. Requests time out, and the bot does not know whether the order went through, which is more dangerous than a clean failure. Rate limits cut off a bot that asks too often. None of these are rare. Expect all of them in the first weeks of a live bot.

The pattern for all of them is the same: after every action, verify. Confirm what the exchange thinks happened before acting again. This is dull work, but it is what lets you leave the bot running unattended.

How much does execution quality matter for a beginner?

A young plant tied to a support stake, growing in a pot

Less than strategy at first, and more every month after. A slow bot trading small size in a liquid market can be sloppy about execution and barely notice. As size grows, as the strategy speeds up, or as markets get thinner, execution becomes a real part of the results. Keep execution basic at the start: plain limit orders, accept that some of them will not fill, and check with the exchange after every order. Add sophistication only when the numbers say you must.

The next guide in this series is risk management: the rules that decide how much a bot may buy, and what happens when it is wrong. This page is Step 6 of the complete guide to algorithmic trading in crypto.

FAQ

What does it mean when an order is executed?

Executed means filled: the exchange matched your order with someone on the opposite side, and the trade happened. Before that moment a limit order is only a request waiting in the book, and it can still be canceled (some exchanges also let you change it). After it, you own the result.

Why did my order fill at a different price than I saw?

The price moved between your decision and your fill, or your order was large enough to consume more than the best available level. Both effects are called slippage. Small orders in liquid markets slip little; market orders in fast moments slip most.

Should a bot use limit orders or market orders?

Limit orders give price certainty but might not fill; market orders give fill certainty but not price. Slow strategies usually prefer limits and accept missed trades. What matters most is that the backtest and the live bot assume the same choice, or the results will not match.