Spread, slippage, and the price of getting filled
From the gap between bid and ask to a dealer’s investigation of execution quality, one benchmark at a time.

The question behind this note
What is spread from the customer, broker and dealer perspectives? Which costs arise in a trade, and why would a dealer examine spread when investigating high customer slippage? How can I analyse the relationship correctly?
In this article
- 1. One market, two immediate prices
- 2. Where spread appears in the bill
- 3. Three perspectives, three different ledgers
- 4. Why spread changes
- 5. Slippage needs an explicit benchmark
- 6. Why a dealer checks spread when users report high slippage
- 7. Depth: a tight top quote can still be expensive
- 8. Order instructions change the question
- 9. Build the event timeline before the dashboard
- 10. A dealer’s minimum useful analysis table
- 11. SQL: attach a benchmark without looking into the future
- 12. Python: make the sign convention testable
- 13. Compare like with like before blaming spread
- 14. Quoted spread, effective spread and markouts
- 15. How to decide what to investigate next
- 16. The trade-off a good investigation must keep visible
You click Buy at the price on screen. The fill arrives a little higher. The dealer’s analyst opens a spread chart. Is the spread the fee? Is the difference slippage? Is the dealer earning both?
Before answering, name the side, the price reference, the moment and the quantity. Without those four coordinates, two accurate-looking execution reports can tell different stories.
This note builds from a two-price quote to a reproducible investigation. The examples use linear EUR/USD exposure, USD as quote/account currency and one pip equal to 0.0001 USD per EUR. Those assumptions do not transfer automatically to yen pairs, gold ticks or every platform’s lot definitions.
1. One market, two immediate prices
Imagine an executable quote of 1.09990 / 1.10010 for an eligible quantity. The bid is where you can sell EUR; the ask is where you can buy it. The dealer’s directions are reversed: buying from you at bid, selling to you at ask. The SEC’s forex introduction explains this two-sided pricing structure in a US retail context.
Here the spread is 0.00020, or 2 pips, and the midpoint is 1.10000. The midpoint is an analytical reference, not a promise that you can trade there. A last-trade chart, midpoint chart and bid chart can all display different values without any being fabricated. Also ask whether a quote is firm or indicative and for what size it is executable.
Buying 100,000 EUR at the ask and immediately selling at the unchanged bid loses USD 20 before other costs. A single aggressive leg costs half the spread, USD 10, versus that midpoint. The unchanged immediate round trip costs one full spread, not two full spreads.
2. Where spread appears in the bill
Spread is usually embedded in the prices rather than listed as a separate debit. A “zero commission” account can therefore still have transaction costs. An execution-price P&L already incorporates its actual entry and exit prices: subtracting the same spread again would double-count it.
| Cost or amount | Where it appears | What to check |
|---|---|---|
| Spread / embedded markup | Bid and ask prices | Instrument, size, session, quote source and account tier |
| Commission | Explicit transaction charge | Per side or round trip; per lot or notional; minimums |
| Financing / overnight adjustment | Holding-period debit or credit | Rate, cutoff, instrument, days charged and administration component |
| Slippage / market impact | Difference from a stated benchmark | Not automatically a separate fee or provider revenue |
| Conversion | Conversion rate or explicit charge | Account currency versus quote and settlement currency |
| Other conditional charges | Contract/account statement | Guaranteed-stop premium, venue/clearing, data, inactivity or withdrawal charges where applicable |
There is no universal number of “payments per trade”. Some are charges, some price differences, and some can be credits. OANDA UK’s charges page is a provider-specific example of spread, financing and account charges; it is not a tariff for Indonesia or every OANDA entity. Taxes, where applicable, require separate jurisdiction-specific checking.
Margin is collateral, not a transaction fee. Leverage changes the collateral needed, not the pip value of an unchanged position size. The economic exposures and any borrowing or financing charge must still be accounted for.
A synthetic flat-mid round trip makes the accounting visible: spread cost USD 20, adverse residual execution of 0.5 pip on each leg USD 10, commission USD 3.50 per leg USD 7, overnight debit USD 4. Total drag is USD 41, before conversion or other charges. The 0.5-pip residual is beyond each contemporaneous executable side quote; it is not another measurement of the same spread. Real market movement belongs in the actual price P&L and must not be counted twice as an additional fee.
3. Three perspectives, three different ledgers
Customer. Spread is the price of crossing from an immediate buyer’s quote to an immediate seller’s quote. Compare all-in terms at your size and trading hours. A low advertised minimum is not your likely total cost.
Broker or intermediary. Depending on the contract, compensation can be commission, a disclosed markup or a revenue-sharing arrangement. Do not assume the whole customer spread belongs to the intermediary. Routing and execution obligations, conflicts and commercial incentives need separate scrutiny.
Dealer. The spread is gross transaction economics, not guaranteed net profit. A principal may face price risk, hedging costs, adverse selection, liquidity needs and operating costs. BIS research on the higher-volatility FX market discusses internalisation and inventory management. The distinction between principal and agent is explored in the broker/dealer note.
A synthetic external quote of 1.09995 / 1.10005 and customer quote of 1.09990 / 1.10010 illustrate a 0.5-pip extra width on each side. On a customer buy that is immediately and fully offset at the external ask, the price difference is 0.5 pip, USD 5 for 100,000 EUR, before hedge slippage and charges. It is not the whole 2-pip customer spread. If the dealer retains risk, a subsequent gain or loss is a different exposure result.
The FX Global Code, Principle 14 addresses fair, reasonable and transparent markup in wholesale FX. We use it as a conduct reference, not as proof of any retail firm’s compliance or a substitute for local law. A skewed quote can move its midpoint as well as change its width; comparing widths alone will miss that.
4. Why spread changes
Possible mechanisms include less executable liquidity, more uncertain future prices, one-sided demand, inventory constraints, hedge costs and commercial markups. These are hypotheses to test for a particular venue, not diagnoses from a single wide quote.
Separate time-weighted spread, which describes the market’s quoted conditions over time, from trade-weighted spread, which describes the conditions customers actually traded in. A long quiet session can dominate the first; a short news burst can dominate the second.
“Fixed spread” is an account or product policy with conditions, not unlimited liquidity at a guaranteed execution price. “Raw spread” is not a complete bill either. Quotes, commission, rejection rules and depth all matter. The FX market is fragmented, so there is no single universal retail FX quote equivalent to every customer’s available price. BIS, FX trade execution describes that fragmented execution setting.
5. Slippage needs an explicit benchmark
For this note, a signed cost is positive when adverse to the client. Some platforms call adverse execution “negative slippage”; translate that vocabulary before comparing reports. Let q = +1 for a customer buy and −1 for a customer sell, P the fill and Q the original same-side quote: ask for buys, bid for sells.
A buy at 1.10010 against ask 1.10010 has zero quote slippage, yet costs 1 pip versus midpoint 1.10000. A buy at 1.10030 has 2 pips adverse quote slippage and 3 pips cost versus the original midpoint. A sell at 1.09970 against bid 1.09990 has 2 pips adverse quote slippage too: reverse the sign, not the interpretation.
For multiple fills, use quantity-weighted average price: sum of quantity × price divided by total filled quantity. Measure outstanding quantity and rejections separately. A report containing only successful fills can look excellent while the provider rejects difficult orders.
6. Why a dealer checks spread when users report high slippage
Spread helps answer two different questions. Is the benchmark already including the cost of crossing the quote? And what were market and pricing conditions when the order travelled and filled?
With symmetric quotes, write the side quote as midpoint plus q × half-spread. Index 0 is the original reference and 1 is server receipt. Then:
Synthetic buy example: initial bid/ask 1.09990/1.10010, receipt bid/ask 1.09990/1.10050, fill 1.10060. Midpoint rises 2 pips; full spread grows from 2 to 6 pips, adding 2 pips on the buy side; residual is 1 pip. Quote slippage is 2 + 2 + 1 = 5 pips. Cost versus the initial midpoint is 6 pips. Calling all 6 pips “slippage” is acceptable only if that midpoint definition is explicit; adding the initial half-spread again would be wrong.
Synthetic EUR/USD example: 100,000 EUR, initial spread 2 pips, initial midpoint 1.10000. One pip is 10 USD. Not a broker simulator.
Slippage vs initial quote: +5 pips = market move +2 + half-spread change +2 + residual +1. Cost vs initial midpoint: +6 pips = 60 USD.
Positive means adverse to the client; negative means price improvement. Residual combines depth effects and movement after receipt, not evidence of dealer misconduct.
| Stage | Bid | Ask | Fill |
|---|---|---|---|
| Initial | 1.09990 | 1.10010 | · |
| Receipt | 1.09990 | 1.10050 | · |
| Execution | · | · | 1.10060 |
A wider spread alone can change the executable side even when midpoint is unchanged. But a wide stable quote can fill with zero same-side quote slippage. A tight spread can coexist with severe slippage if prices jump, a quote is stale, or available size is tiny. Spread is a diagnostic variable, not a verdict.
For asymmetrically marked-up or skewed quotes, keep the actual bid and ask from each customer-specific quote. Their arithmetic midpoint makes the identity work, but does not magically reveal an independent fair price. Use a separately labelled executable external reference if investigating markup.
7. Depth: a tight top quote can still be expensive
Suppose a synthetic ask ladder offers 50,000 EUR at 1.10010, another 50,000 at 1.10020, and 100,000 at 1.10040. Buying 200,000 EUR sweeps all three levels, producing VWAP 1.100275.
Relative to the first ask, adverse slippage is 1.75 pips, or USD 35 on 200,000 EUR. No latency is required for that example: insufficient quantity at the best ask explains the difference. The displayed top spread says nothing about how many units can trade there.
In OTC FX, displayed liquidity may be duplicated across venues, subject to credit or last look, or unavailable to your account. A consolidated ladder is not automatically a sum of independently executable quantities. This is one reason a replay needs eligible liquidity, not a screenshot of best prices.
8. Order instructions change the question
Market orders prioritise immediate execution over a guaranteed price, within the venue’s terms. A limit constrains price but may not fill. A normal stop can become a market order after triggering and fill beyond its trigger during a gap. A stop-limit adds a price boundary but may remain unfilled. Guarantees exist only where a specific guaranteed-stop product and its terms provide them.
The SEC’s order-type bulletin explains these distinctions for US stocks. OANDA UK’s order guide illustrates provider-specific applications. Neither establishes the exact trigger policy for an Indonesian contract.
For a long position, closing normally means selling at bid; for a short, buying at ask. A widening ask can therefore matter to a short stop while a bid-only chart looks quiet. Check which price triggers the order and which price executes it. Do not infer stop hunting, or dismiss it, from a chart that omits the relevant side.
9. Build the event timeline before the dashboard
- Client sees a quote and submits an order
- Server receives and validates the request
- Router selects a path; any external request is acknowledged or rejected
- Partial fills occur; confirmations return to the client
Record timestamps and quote IDs at each stage. Client, gateway, pricing and liquidity-provider clocks need measured alignment; receipt-to-fill is not the same as click-to-fill.
Keep quote generation and delivery times, customer-visible quote ID, client submit, gateway/server receipt, route send, acknowledgement, each fill and client confirmation. Separate network, queue, validation/routing, provider response and return-trip delays where instrumentation permits. Timestamp resolution is not the same as clock accuracy.
Join quotes backward in time to the event being benchmarked: never attach a quote that only became known later. Bound quote age; record out-of-order and duplicate events. A negative latency may mean a clock problem, not exceptionally fast execution. Reconcile retries and partial fills by parent and attempt IDs to avoid turning one order into several supposed customers.
10. A dealer’s minimum useful analysis table
Store only what the investigation needs, with restricted access to customer-level records.
| Group | Useful fields |
|---|---|
| Contract | Symbol, quote currency, base units, tick/pip size, contract multiplier |
| Instruction | Pseudonymous account/group, parent ID, attempt ID, buy/sell, order type, requested quantity and price constraints |
| Quotes | Client-visible bid/ask and quote ID; server/route-eligible bid/ask, size and timestamp; quote age |
| Lifecycle | Submit, receipt, route, acknowledgement, fill and confirmation times, with clock source |
| Outcome | Fill quantity, price, commission, reject/cancel/timeout reason and remaining quantity |
| Context | Session, event window, lagged volatility, depth, route/provider, account pricing configuration |
Separate the client trade from the dealer’s hedge. A delayed hedge fill can hurt dealer P&L without changing the already-confirmed customer fill. Conversely, a poor customer fill requires investigation even if the hedge was profitable. Do not substitute one ledger’s execution quality for the other’s.
The GFXC TCA template and its data instructions offer a wholesale algorithmic-execution reference for parent and child order reporting. The table above is an adapted diagnostic design, not an assertion that these are mandatory retail fields.
11. SQL: attach a benchmark without looking into the future
The following PostgreSQL pattern assumes one chosen benchmark event per order and a pre-aggregated fill VWAP. It deliberately does not join raw fills and raw ticks in a many-to-many merge. The 500 ms cutoff is an illustrative quality policy, not an industry standard.
SELECT o.order_id, o.side, f.fill_qty, f.vwap,
q.quote_id, q.bid, q.ask,
EXTRACT(EPOCH FROM (o.received_at - q.quote_at)) * 1000 AS quote_age_ms,
CASE WHEN o.side = 'buy' THEN 1 ELSE -1 END
* (f.vwap - CASE WHEN o.side = 'buy' THEN q.ask ELSE q.bid END)
/ o.pip_size AS receipt_quote_slippage_pips
FROM orders o
LEFT JOIN fill_vwap f ON f.order_id = o.order_id
LEFT JOIN LATERAL (
SELECT quote_id, quote_at, bid, ask
FROM eligible_quotes q
WHERE q.symbol = o.symbol
AND q.pricing_group = o.pricing_group
AND q.quote_at <= o.received_at
AND q.quote_at >= o.received_at - INTERVAL '500 milliseconds'
AND q.ask >= q.bid
ORDER BY q.quote_at DESC, q.sequence DESC
LIMIT 1
) q ON TRUE;
Missing quote matches and unfilled orders remain visible as nulls. Audit their frequency rather than dropping them silently. The receipt quote is not necessarily the customer’s displayed quote: join a captured client quote ID separately when measuring quote-to-fill slippage. A single top quote does not establish sufficient depth at the order size. Validate source schemas, timestamps, pip sizes and fill aggregation before adapting this to production.
12. Python: make the sign convention testable
This standalone synthetic example uses base-currency units. For other contracts, apply their actual multiplier and currency conversion.
from math import isclose
def execution_cost(side, fill, bid, ask, units, pip=0.0001):
if side not in ('buy', 'sell') or ask < bid or units <= 0 or pip <= 0:
raise ValueError('invalid trade or quote')
q = 1 if side == 'buy' else -1
ref = ask if q == 1 else bid
mid = (bid + ask) / 2
slip = q * (fill - ref) / pip
cost = q * (fill - mid) / pip
return slip, cost, cost * pip * units
buy = execution_cost('buy', 1.10030, 1.09990, 1.10010, 100_000)
sell = execution_cost('sell', 1.09970, 1.09990, 1.10010, 100_000)
assert all(isclose(x, y, abs_tol=1e-8) for x, y in zip(buy, (2, 3, 30)))
assert all(isclose(x, y, abs_tol=1e-8) for x, y in zip(sell, (2, 3, 30)))
An account-currency amount needs an appropriate conversion rate if the account is not USD. Production code also needs finite-value, identifier and unit checks; the bounded website explorer accepts no uploaded dataset and runs no reader-supplied code.
13. Compare like with like before blaming spread
Segment by symbol, session/news window, side, order type, quantity/depth ratio, latency, quote age, route/provider and pricing group. Report counts, coverage and both order-weighted and notional-weighted results; show p50/p95/p99 adverse-cost tails, improvement rates and rejection rates. Keep cancelled and unfilled demand in an appropriate denominator.
A synthetic confounding example: both tight- and wide-spread groups have 0.1-pip mean slippage among fast orders and 1.0 pip among slow orders. Tight-spread traffic is 900 fast + 100 slow; wide-spread traffic is 100 fast + 900 slow. Their overall averages are 0.19 versus 0.91 pip, despite equal results within each speed group. A naive “wide spreads caused 0.72 pip extra slippage” conclusion would be unsupported.
Build matched cohorts or a model with pre-event volatility, quantity, latency and routing controls; cluster uncertainty by an appropriate time/parent unit and validate on later periods. These are analysis proposals, not empirical findings here. Quote age and latency may themselves be linked to routing decisions, so statistical adjustment requires a causal question, not a checklist of every variable. Avoid post-fill volatility as a “predictor” of the same fill. Randomised routing may help only where contractually and operationally appropriate; changing spreads to customers without governance is not an experiment to improvise.
14. Quoted spread, effective spread and markouts
Use fill-time midpoint Mt for an immediate transaction-cost comparison. For a later, aligned midpoint Mh at a stated horizon:
The dealer’s gross per-unit edge at horizon h, before costs and hedges, is q(P − Mh); the customer’s opposite markout is q(Mh − P). It is not realised cash profit if a position remains open. A negative dealer markout can reflect adverse selection or normal price movement; it does not establish intent. Use several stated horizons, eligible synchronized reference prices and separate hedge economics. Customer direction is the opposite of dealer trade direction: mixing those signs reverses the conclusion.
15. How to decide what to investigate next
- High cost versus midpoint, low same-side slippage: inspect spread/markup and the original benchmark definition first.
- High original-quote slippage, low receipt-quote residual: inspect pre-receipt price changes, quote age and network timing.
- High receipt residual concentrated in large orders: inspect eligible depth, partial fills and routing.
- High residual around one provider, after matching conditions: inspect provider acknowledgements, rejects, clocks and path configuration before changing routing.
- Poor dealer hedge results but unchanged customer fills: investigate the hedge book separately.
- Apparent improvement with rising rejects or missing quote matches: investigate selection and data coverage before celebrating.
Where last look is used, distinguish rejection, requote and executed slippage. FX Global Code Principle 17 calls for disclosure of its purpose and operation, including price-check direction. It also addresses confidentiality and trading based on a request during the last-look window. These wholesale principles are a review reference, not blanket permission for any delay or local legal conclusions.
16. The trade-off a good investigation must keep visible
Faster execution can reduce exposure to price movement while consuming more liquidity; slower execution can reduce footprint while increasing market risk or leaving an order incomplete. The BIS report on FX execution algorithms, section 2.1 discusses that execution trade-off. “Minimise slippage” is incomplete unless the benchmark, time horizon, fill rate and risk objective are specified.
Your next practical exercise is to reconstruct ten orders end to end, reconcile the signed arithmetic, then compare matched cohorts over a later sample. An expert investigation does not stop at a spread chart: it explains which price changed, at what time, for whose order and eligible quantity, with what evidence and remaining uncertainty.
Sources, review, and limits
The same AI assistant reviewed this article sequentially in three roles. This is not independent model review, licensed expert review, or a guarantee of accuracy.
What was checked?
- Sources & claims: Ten primary sources mapped to mechanisms; wholesale FX, US stock and UK provider scopes distinguished from Indonesian retail rights. Formulas and diagnostic design labelled as derivations/adaptations.
- Numbers & mechanisms: Buy/sell direction and 1,320 explorer combinations reconciled; VWAP 1.100275, USD 41 costs and cohort example recalculated. Python blocks in both languages executed; SQL reviewed as a pattern, not run against a production server.
- Editorial & readability: Progression from quote basics to dealer diagnosis checked; spread is not treated as dealer net profit or sole cause of slippage. English/Indonesian editions retain identical numeric assumptions and limitations.
- Execution decomposition: 1,320 buy/sell scenarios · passed
- VWAP, round-trip cost and confounding arithmetic · passed
- Embedded Python examples: both language editions executed · passed
- SQL static review: backward join, null coverage, no raw tick/fill fanout; database execution not claimed · passed
- Language pair: prices, signs, quantities and source scope compared · passed
Primary sources
- SEC: Forex Trading for Individual Investors
Background: FX rates, quotes and pricing; transaction costs.
- OANDA UK: Trading charges and fees
Trading costs, financing and other charges sections.
- BIS: The global FX market in a higher-volatility environment
Dealer inventory management and internalisation discussion (2022).
- GFXC: FX Global Code
Principles 14 and 17, printed pages 20 and 22. PDF inspected and locally extracted.
- BIS: FX trade execution, complex and highly fragmented
Market fragmentation, electronic venues and internalisation (2019).
- SEC: Understanding order types
Market, limit, stop and stop-limit sections; US securities context.
- OANDA UK: Order types explained
Limit and stop execution explanations.
- GFXC: Algo/TCA templates
TCA framework description.
- GFXC: TCA data instructions
2021 version, parent/child order data fields and explanatory statement.
- BIS: FX execution algorithms and market functioning
Section 2.1, printed pages 18–21 / PDF pages 24–27.
What remains unverified
- All numerical examples are synthetic; no customer records, dealer quotes or live execution results are analysed.
- Sources cover wholesale FX, US securities and a UK provider; they do not establish Indonesian retail contractual or regulatory rights.
- A decomposition attributes arithmetic differences, not causal blame. Observational cohorts cannot rule out unmeasured confounding.
- This is a study primer, not a qualification or trading recommendation. Sequential AI review is not independent expert verification.
Revision 1 · December 6, 2026. Substantive changes require renewed review. Publication was requested by the owner after review.
Report a correction with sources ↗Connected reading
- Brokers, dealers, and who carries the risk
AI-generated · EN · Relation: extends
- Making supply chains easier to understand
Original · EN · Shared topics: Analytics
- Looking for early signals in meme coins
Original · EN · Shared topics: Finance