Order types explained: market, limit, stop and stop-limit

Every trade a bot places is one of a handful of order types, and choosing the wrong one is a quiet, recurring tax on your returns. A market order guarantees a fill but not a price; a limit order guarantees a price but not a fill. A stop becomes a market order at a trigger; a stop-limit becomes a limit. Which you choose decides your fees (maker vs taker), your slippage, and whether you actually get into the trade. This guide explains each order type, the maker/taker fee split, time-in-force, and which to use in bot code.

On this page
  1. Market orders
  2. Limit orders
  3. Stop & stop-limit
  4. Maker vs taker
  5. Time-in-force
  6. Which to use in a bot
  7. FAQ

Market orders — fill now, price uncertain

A market order executes immediately against the best available price. You are guaranteed a fill but not a price — in a fast or thin market the fill can be far from the last quote, which is exactly slippage. Market orders are taker orders and pay the higher fee.

Limit orders — price guaranteed, fill uncertain

A limit order rests in the book at a price you set and only fills if the market reaches it. You control the price but might never get filled. Limit orders that sit in the book add liquidity and earn the lower maker fee — the basis of the market-making and scalping rebate edge.

mid asks bids market buy = taker limit buy = maker
A market order crosses the spread and pays the taker fee; a resting limit order earns the maker fee.

Stop and stop-limit orders

A stop (stop-market) order is dormant until price hits a trigger, then becomes a market order — the standard way a bot exits a loser. A stop-limit triggers into a limit order instead, protecting against slippage but risking no fill if price gaps through. For a hard stop-loss most bots use stop-market so the exit is guaranteed; a stop-limit can leave you in a losing trade during a gap.

Maker versus taker fees

Exchanges charge a lower fee (sometimes a rebate) for maker orders that add liquidity and a higher fee for taker orders that remove it. Over thousands of trades the difference dominates a high-frequency strategy’s P&L — a point the scalping guide hammers home.

Time-in-force

Time-in-force tells the exchange how long a limit order stays live: GTC (good-till-cancelled) rests until filled or pulled, IOC (immediate-or-cancel) fills what it can now and cancels the rest, and FOK (fill-or-kill) demands the whole size at once or nothing. Bots use IOC/FOK to avoid stale resting orders.

Which order type to use in a bot

Use a market order when certainty of execution matters more than a few basis points (exiting a loser, entering a fast breakout). Use a limit order to control entry price and earn the maker fee when you can afford to miss the trade. Use a stop-market for your hard stop. Always size from that stop with the position calculator, and backtest the fee assumption on the backtester.

Not financial advice. This content is educational. Automated and algorithmic trading carries a real risk of financial loss. Never trade money you cannot afford to lose. Review the SEC investor.gov and CFTC resources before trading.

Frequently asked questions

What is the difference between a market and a limit order?

A market order fills immediately at the best available price, guaranteeing execution but not the price, so it can slip in a fast market. A limit order rests at a price you set and only fills if the market reaches it, guaranteeing the price but not the fill.

What is a stop-limit order?

A stop-limit order stays dormant until price hits a trigger, then becomes a limit order rather than a market order. It protects against slippage but risks not filling if price gaps straight through the limit, which can leave a bot stuck in a losing trade — so most hard stops use stop-market instead.

What are maker and taker fees?

Exchanges charge a lower maker fee, sometimes a rebate, for limit orders that rest in the book and add liquidity, and a higher taker fee for market orders that remove liquidity. Over thousands of trades this difference can dominate a high-frequency strategy’s profit and loss.

Which order type should a trading bot use?

Use a market order when certainty of execution matters most, such as exiting a loser or chasing a fast breakout; use a limit order to control entry price and earn the maker fee when you can afford to miss the trade; and use a stop-market order for a hard stop-loss so the exit is guaranteed.

MB

Mustafa Bilgic

Algorithmic trading practitioner · Founder, AITradingBot.us

Mustafa builds and backtests automated trading systems and writes about them without the hype. Every tool on this site is free and runs entirely in your browser.