Lesson

Executing and calculating a trade: order book, slippage, fees and funding

The spread in the table is the best prices, not your fill price. We look at how the order book turns a 1.5% spread into a smaller number, how to open two legs without being left with one, and calculate the whole trade from entry to exit.

Published9 min read
A stepped stack of glass blocks of different widths with coins sliding down it, one slipping off an edge
Illustration: P2P.Army, AI-generated (Leonardo, GPT Image 2).

Finding a spread is half the job. The other half is entering and exiting so that something of it remains. In the screener table the spread is calculated from the best prices, while execution depends on how much volume sits at those prices.

Order book and slippage

The order book is the list of buy and sell orders. A market order takes volume from the best prices, and when that runs out it moves to the next levels. Example: a sub-cent coin, and you want to buy $3,000 worth.

An illustrative sell side and a $3,000 buy
Price (ask)Volume at levelTaken by your order
0.00584$800$800
0.00586$1,200$1,200
0.00590$3,000$1,000
Average fill price 0.005868 — 0.48% above the best price. With entry and exit on two legs, such slippage repeats four times.

Hence the rule: look at the order book on both exchanges before entering and size the position to the volume sitting near the best price. If the volume at the best levels is tens of dollars, a 5% spread cannot be captured.

Order types

Which orders to use
OrderHow it worksWhen to use it
MarketFills immediately at the best available prices; taker feeA liquid leg, small size, the hedge must be closed immediately
LimitFills at your price or better, may not fill; if it rests in the book — maker feeThe less liquid leg, when there is time
Post-onlyRejected if it would fill immediately as a takerSaving on fees when there is no rush
IOC / FOKFill immediately and cancel the rest (IOC) or fill entirely or not at all (FOK)Limit slippage without leaving resting orders
Reduce-onlyCan only reduce a position, never open a new one in the opposite directionExiting legs, especially in parts

Single-leg risk

While only one leg is open, you are not in arbitrage but in an ordinary bet on price going up or down. The longer that pause, the bigger the risk. An order of operations that reduces it:

  1. 1

    The less liquid side first

    Place a limit order where there is less volume: that is the leg that is harder to fill at a good price.
  2. 2

    The second leg right away

    As soon as the first fills (fully or partially), open the second on the liquid exchange with a market order for the same number of coins.
  3. 3

    In parts

    If the book is thin, split the position into several parts and repeat the “limit — market” pair.
  4. 4

    Reconcile

    After entry the number of coins on both legs must match. A leftover on one leg is an open bet on price.

The full trade calculation

The calculator on the screener’s landing page computes the ideal case: the spread fully converges to zero and there is no slippage. It is useful for understanding the mechanics, but a real trade is almost always worse.

Fig. 1. The calculator from the /futures/screener page, October 31, 2026. It assumes the spread fully converges to zero and funding stays constant — the note under the calculator says so plainly. Slippage is not included.Screenshot: p2p.army, 10/31/2026Open source
An illustrative perp + perp trade: ideal and realistic scenario, % of position size per leg
ItemAs in the calculatorRealistic
Entry spread+1.50%+1.50%
Exit spread0.00%+0.30%
Fees, 4 trades−0.20%−0.20%
Slippage0.00%−0.30%
Funding over 1 day+0.06%+0.06%
Total+1.36%+0.76%
Illustrative parameters. If the exit spread is wider than the entry spread, the result is negative — see the scenarios in lesson 4.

Exit

  • At the same time. Close both legs within the same minute and with the same number of coins.
  • Reduce-only. Reduce-only orders prevent accidentally opening a position in the opposite direction if one leg is already closed.
  • In parts. On a thin book, exit is as expensive as entry. Close in parts and keep the legs equal.
  • Do not hold one leg. If one leg closed and the other did not, close it immediately, even at a worse price.

Frequently asked questions

What is slippage?

The difference between the expected price and the actual average fill price. It happens when there is not enough volume at the best prices and the order walks several book levels.

Should I open the legs with market or limit orders?

The less liquid leg with a limit order, so as not to lose the spread to slippage. The liquid leg with a market order right after the first fills, so you do not hold one leg without a hedge.

Why use a reduce-only order?

It can only reduce a position. If one leg is already closed, such an order will not accidentally open a new position in the opposite direction.

Why does the calculator show more than I got?

The calculator computes the ideal case: full convergence of the spread to zero and zero slippage. In a real trade the spread converges partially, and execution on a thin book is worse than the best prices.

Sources

  1. 1.
  2. 2.
  3. 3.
  4. 4.
Tags:#futures spread arbitrage#slippage
Share:Telegram𝕏

About the author

Antonio Merkle — crypto expert, arbitrage trader and P2P.Army author

Crypto expert, arbitrage trader and investor

Crypto expert and hands-on crypto arbitrage trader, investor and software developer with over 20 years of experience. On the P2P.Army blog he covers exchange news, P2P and cross-exchange arbitrage.

  • Crypto arbitrage
  • P2P arbitrage
  • Cross-exchange arbitrage
  • Crypto exchanges
  • Investing
  • Software development
All articles by the author →