SX APIsx.bet ↗
Access SX Bet sports betting data: active markets, order books, betting consensus, trade history, and sports/leagues via 5 structured endpoints.
What is the SX API?
The SX Bet API covers 5 endpoints that expose live sports betting data from the SX Bet peer-to-peer prediction market, including active fixtures with odds, full open order books, and executed trade history. The get_active_markets endpoint returns fixture objects with team names, game times, and market types across all available sports, while get_order_book exposes individual limit orders down to maker address and stake size.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/058ef682-6d8f-4228-a019-d255f034e3b9/get_sports_leagues' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace sx-bet-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: SX Bet API — bounded, re-runnable; every call capped."""
from parse_apis.sx_bet_api import SXBet, ParseError
client = SXBet()
# Discover available sports and leagues
for sport in client.sport_infos.list(limit=3):
print(sport.sport_name, [lg.label for lg in sport.leagues[:2]])
# List active fixtures in a league
for fixture in client.fixtures.list(league_id="1308", limit=3):
print(fixture.team_one, "vs", fixture.team_two, fixture.game_time)
# Drill into a fixture's order book
match = client.fixtures.list(league_id="1308", limit=1).first()
if match:
book = match.order_book()
print(book.fixture.team_one, "order book markets:", list(book.order_book.keys()))
# Get consensus data for a fixture
if match:
cons = match.consensus()
for mtype, mcons in cons.consensus.items():
print(mtype, "implied_prob_one:", mcons.implied_probability_one,
"implied_prob_two:", mcons.implied_probability_two)
# Browse trade history for the fixture
if match:
for trade in match.trades.list(limit=3):
print(trade.bettor, trade.stake, trade.odds, trade.betting_outcome_one)
# Typed error handling
try:
gone = client.fixture(fixture_id="INVALID_ID")
gone.order_book()
except ParseError as e:
print("error:", e.code)
print("exercised: sport_infos.list / fixtures.list / order_book / consensus / trades.list")
Returns all available sports and their active leagues on the SX Bet platform, including event counts per league. Use to discover league IDs for filtering active markets.
No input parameters required.
{
"type": "object",
"fields": {
"sports": "array of sport objects with nested leagues",
"total_leagues": "total number of active leagues"
},
"sample": {
"data": {
"sports": [
{
"leagues": [
{
"label": "ATP Washington",
"sport_id": 6,
"league_id": 1308,
"event_count": 62,
"event_types": [
"game-lines",
"set-betting"
]
}
],
"sport_id": 6,
"sport_name": "Tennis"
}
],
"total_leagues": 25
},
"status": "success"
}
}About the SX API
Sports, Leagues, and Fixtures
Start with get_sports_leagues to retrieve the full list of active sports and their nested leagues, each tagged with an event count. The returned league_id values feed directly into get_active_markets, where you can pull all fixtures for a given league or filter upcoming fixtures by sport name (e.g. 'Tennis', 'Soccer'). Each fixture object includes team names, scheduled game time, total volume, and available market types. An optional bet_group parameter narrows results to specific market groupings such as 'game-lines' or '1X2'.
Order Book and Market Consensus
get_order_book accepts a fixture_id from get_active_markets and returns the full set of open limit orders, keyed by market type (MONEY_LINE, SPREAD, OVER_UNDER) and split into outcome-one and outcome-two sides. Each order carries odds expressed as an implied probability (0–1), stake size, and maker address. To focus on a single market, pass an optional market_hash. The companion get_market_consensus endpoint aggregates the same order book data into a per-market summary: best decimal odds, implied probability, total liquidity per side, and percentage distribution — useful for quickly gauging where market maker weight sits without iterating through individual orders.
Trade History
get_match_trades returns paginated execution history for a fixture. Each trade object includes bettor username, stake amount, decimal odds, implied probability, which outcome was selected, and settlement status. Pagination is zero-based via the page parameter, and the response includes total_trades so callers can calculate the number of pages needed. This endpoint is the primary way to reconstruct historical betting activity for a specific fixture.
The SX API is a managed, monitored endpoint for sx.bet — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when sx.bet changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official sx.bet API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Building a live odds tracker that compares implied probabilities across MONEY_LINE, SPREAD, and OVER_UNDER markets for upcoming fixtures
- Monitoring open order book depth on specific fixtures to identify liquidity imbalances before match start
- Analyzing betting consensus shift over time by polling
get_market_consensusat intervals for the same fixture_id - Aggregating trade history via
get_match_tradesto study closing-line value and bettor patterns on settled fixtures - Discovering new leagues and event counts by sport using
get_sports_leaguesto track market expansion on SX Bet - Filtering ATP tennis fixtures by league_id in
get_active_marketsfor sport-specific odds dashboards
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does SX Bet have an official developer API?+
What does `get_order_book` return, and how granular is it?+
market_hash.Does `get_active_markets` return historical or completed fixtures?+
get_match_trades, which includes settlement status per trade. If you need to query completed fixtures directly, you can fork this API on Parse and revise it to add a historical fixtures endpoint.Is live in-play (in-game) betting data included?+
How does pagination work in `get_match_trades`?+
page integer parameter. The response always returns total_trades for the fixture, so you can compute the full page count on the client side. The first page is page=0.