Skip to main content

Overview

When you fill an order on SX Bet, you set a desiredOdds and an oddsSlippage. Together, these control the worst weighted average odds you’re willing to accept.
  • oddsSlippage = 0 — only fill at desiredOdds or better
  • oddsSlippage = 3 — accept up to 3% worse than desiredOdds on a weighted average basis
The oddsSlippage field is an integer from 0 to 100 representing a percentage.

Why slippage exists

Between the moment you submit a fill and the moment the exchange matches it (after the betting delay), the orderbook can change:
  • The order you targeted may get cancelled by the maker
  • Another taker may fill the order before you
  • The maker may update their odds by cancelling and reposting
  • For in-play markets, odds shift constantly as the game progresses
Without slippage, any of these changes would cause your fill to fail entirely. With a small slippage tolerance, your bet can still go through at slightly worse odds rather than failing outright.

How slippage is calculated

Slippage applies to the weighted average odds across all orders your fill matches — not to each individual order. The exchange checks:
weighted_average_odds >= desiredOdds * (1 - oddsSlippage / 100)
This means individual orders in your fill can have odds worse than your desiredOdds, as long as the overall weighted average stays within your slippage tolerance.

Example 1: Filling across multiple price levels

You submit a fill for $10,000 at desiredOdds of 2.10 with 5% slippage. The orderbook has taker liquidity at these levels:
Taker oddsAvailable liquidity
2.10$2,000
2.09$3,000
2.07$15,000
The exchange fills your $10,000 across all three levels:
Taker oddsAmount filledContribution to average
2.10$2,0002,000×2.10=2,000 × 2.10 = 4,200
2.09$3,0003,000×2.09=3,000 × 2.09 = 6,270
2.07$5,0005,000×2.07=5,000 × 2.07 = 10,350
Weighted average odds = (4,200+4,200 + 6,270 + 10,350)/10,350) / 10,000 = 2.082 Your minimum acceptable odds = 2.10 * (1 - 0.05) = 1.995. Since 2.082 > 1.995, the fill succeeds — even though some of the liquidity was at 2.07.

Example 2: Slippage protects you from filling at bad odds

Slippage is based on your weighted average across all matched orders. If the orderbook is mostly stale or far off your target price, the weighted average will fall below your threshold and the fill will fail — protecting you from getting a bad price. You submit a fill for $50 at desiredOdds of 2.30 with 3% slippage. The orderbook has:
Taker oddsAvailable liquidity
2.30$10
2.00$40
Your minimum acceptable odds = 2.30 * (1 - 0.03) = 2.231. The exchange would need to fill across both levels:
Taker oddsAmount filledContribution to average
2.30$1010×2.30=10 × 2.30 = 23.00
2.00$4040×2.00=40 × 2.00 = 80.00
Weighted average odds = (23.00+23.00 + 80.00) / $50 = 2.06 Since 2.06 < 2.231, the fill fails. The 2.00 liquidity drags the weighted average well below your threshold, so you receive an ODDS_STALE error rather than being filled at a price far from what you intended.

Choosing a slippage value

ScenarioRecommended slippageReasoning
Pre-game markets0Odds are stable; you want exactly what you see
Pre-game, large fills12Slight tolerance for orders getting taken between submission and matching
In-play markets35Odds shift constantly; some tolerance prevents repeated failures
Fast-moving in-play510Prioritize execution over price precision
Higher slippage means you may get filled at worse odds. Only increase slippage when execution speed matters more than getting the exact price.

Error: ODDS_STALE

If the exchange can’t find any orders within your slippage tolerance, it returns an ODDS_STALE error. This means:
  • The orders that existed when you checked have been filled or cancelled
  • The remaining liquidity is at odds worse than your desiredOdds plus slippage allows

Filling Orders →

Full guide to filling orders as a taker.

POST /orders/fill/v2 →

Full API reference for the fill endpoint.

Odds Formats →

Converting between implied, American, and decimal odds.

Navigating the Orderbook →

Reading orderbook depth and finding the best prices.