# SX Bet Documentation > Developer documentation for the SX Bet API — a peer-to-peer sports prediction market. Build trading bots, market-making systems, and custom frontends with REST, WebSocket, and on-chain APIs. ## Docs - [API Key](https://docs.sx.bet/api-reference/api-key.md): Generating and using an API key - [Active Order Updates](https://docs.sx.bet/api-reference/centrifugo-active-order-updates.md): Subscribe to real-time changes in a user's orders - [Best Odds](https://docs.sx.bet/api-reference/centrifugo-best-odds.md): Subscribe to real-time best odds updates - [Reliability & Recovery](https://docs.sx.bet/api-reference/centrifugo-best-practices.md): Key patterns for maintaining consistent state across connects and reconnects - [CE Refund Events](https://docs.sx.bet/api-reference/centrifugo-ce-refund-events.md): Subscribe to real-time capital efficiency refund events - [Consolidated Trade Updates](https://docs.sx.bet/api-reference/centrifugo-consolidated-trade-updates.md): Subscribe to real-time consolidated trade updates - [Initialization](https://docs.sx.bet/api-reference/centrifugo-initialization.md): Connect to the SX Bet real-time WebSocket API using Centrifuge - [Line Changes](https://docs.sx.bet/api-reference/centrifugo-line-changes.md): Subscribe to real-time line changes - [Live Score & Fixture Updates](https://docs.sx.bet/api-reference/centrifugo-live-score-updates.md): Subscribe to real-time live scores and fixture updates - [Market Updates](https://docs.sx.bet/api-reference/centrifugo-market-updates.md): Subscribe to real-time market changes - [Migrating from Ably](https://docs.sx.bet/api-reference/centrifugo-migration.md): Step-by-step guide for migrating from the legacy Ably WebSocket API to Centrifugo. - [Order Book Updates](https://docs.sx.bet/api-reference/centrifugo-order-book-updates.md): Subscribe to real-time changes in a market's order book - [Websocket Channels](https://docs.sx.bet/api-reference/centrifugo-overview.md): Real-time data via the SX Bet WebSocket API - [Parlay Market Requests](https://docs.sx.bet/api-reference/centrifugo-parlay-market-requests.md): Subscribe to real-time parlay market requests - [Trade Updates](https://docs.sx.bet/api-reference/centrifugo-trade-updates.md): Subscribe to real-time trade updates - [Why Migrate](https://docs.sx.bet/api-reference/centrifugo-why.md): Limitations of the legacy Ably WebSocket API and the improvements Centrifugo provides - [Order Signing](https://docs.sx.bet/api-reference/eip712-signing.md): How to sign order and fill payloads with your private key - [Fees](https://docs.sx.bet/api-reference/fees.md): Fee structure for trading on SX Bet - [Fixture Statuses](https://docs.sx.bet/api-reference/fixture-statuses.md) - [Best odds](https://docs.sx.bet/api-reference/get-best-odds.md): Get the best available odds for markets or leagues on the SX Bet exchange. - [Fixtures](https://docs.sx.bet/api-reference/get-fixture-active.md): Retrieve active fixtures (games and events) for a league on SX Bet. - [Fixture status](https://docs.sx.bet/api-reference/get-fixture-status.md): Check the current status of specific fixtures by event ID on SX Bet. - [Teams](https://docs.sx.bet/api-reference/get-league-teams.md): Get all teams within a specific league on SX Bet. - [Leagues](https://docs.sx.bet/api-reference/get-leagues.md): List all leagues supported by the SX Bet exchange. - [Active leagues](https://docs.sx.bet/api-reference/get-leagues-active.md): Get leagues that currently have active markets on the SX Bet exchange. - [Live scores](https://docs.sx.bet/api-reference/get-live-scores.md): Get real-time live scores for active events on SX Bet. - [Active markets](https://docs.sx.bet/api-reference/get-markets-active.md): Retrieve all active betting markets on the SX Bet exchange, with filters for sport, league, and event. - [Specific Markets](https://docs.sx.bet/api-reference/get-markets-find.md): Look up specific markets by their market hash, including settlement details for resolved markets. - [Popular markets](https://docs.sx.bet/api-reference/get-markets-popular.md): Get the most popular betting markets by volume on the SX Bet exchange. - [Metadata](https://docs.sx.bet/api-reference/get-metadata.md): Retrieve exchange metadata including contract addresses, supported tokens, and configuration parameters. - [Active orders](https://docs.sx.bet/api-reference/get-orders.md): Query active orders on the SX Bet orderbook. Filter by market hash, maker address, or token. - [Sports](https://docs.sx.bet/api-reference/get-sports.md): List all sports available for betting on the SX Bet exchange. - [Active trades](https://docs.sx.bet/api-reference/get-trades.md): Query recent trades on SX Bet, broken down by individual order. - [Consolidated trades](https://docs.sx.bet/api-reference/get-trades-consolidated.md): Get consolidated trade history with pagination on the SX Bet exchange. - [Trades by orderHash](https://docs.sx.bet/api-reference/get-trades-orders.md): Retrieve trades for specific order hashes on the SX Bet exchange. - [Portfolio refunds](https://docs.sx.bet/api-reference/get-trades-refunds.md): Retrieve capital-efficiency refund events for a bettor on SX Bet. - [Heartbeat](https://docs.sx.bet/api-reference/heartbeat.md): Automatic order cancellation on connectivity loss - [SX Bet API Reference](https://docs.sx.bet/api-reference/introduction.md): Be your own bookmaker or fill orders programmatically with the SX Bet API. REST endpoints for markets, orders, trades, and real-time WebSocket data. - [Market Types](https://docs.sx.bet/api-reference/market-types.md) - [Odds ladder](https://docs.sx.bet/api-reference/odds-ladder.md): The SX Bet odds ladder enforces 0.125% intervals to prevent diming. Learn how to validate and round odds. - [Parlay Markets](https://docs.sx.bet/api-reference/parlay-markets.md): How parlay (multi-leg) markets work on SX Bet - [Approve order fill](https://docs.sx.bet/api-reference/post-approve.md): Approve token spending via EIP-2612 permit for SX Bet order execution. - [Cancel all orders](https://docs.sx.bet/api-reference/post-cancel-all.md): Cancel all your open orders across all markets on SX Bet. - [Cancel event orders](https://docs.sx.bet/api-reference/post-cancel-event.md): Cancel all your open orders for a specific event on SX Bet. - [Cancel individual orders](https://docs.sx.bet/api-reference/post-cancel-orders.md): Cancel specific open orders by order hash on the SX Bet exchange. - [Filling orders](https://docs.sx.bet/api-reference/post-fill-order.md): Fill an existing order on the SX Bet orderbook as a taker, with built-in betting delay and odds matching. - [Register Heartbeat](https://docs.sx.bet/api-reference/post-heartbeat.md): Register or refresh a heartbeat to auto-cancel orders on connectivity loss. - [Cancel Heartbeat](https://docs.sx.bet/api-reference/post-heartbeat-cancel.md): Cancel a registered heartbeat - [Post a new order](https://docs.sx.bet/api-reference/post-new-order.md): Submit a new maker order to the SX Bet orderbook. Requires an EIP-712 signature. - [References](https://docs.sx.bet/api-reference/references.md): Endpoints, chain IDs, contract addresses, and network details for mainnet and testnet - [Search fixtures](https://docs.sx.bet/api-reference/search.md): Find active fixtures by team name on SX Bet. - [Testnet](https://docs.sx.bet/api-reference/testnet.md): Using the SX Bet testnet for development and testing - [Unit Conversion](https://docs.sx.bet/api-reference/unit-conversion.md): Converting token amounts and odds formats - [Accounts](https://docs.sx.bet/developers/accounts.md): Understand accounts and authentication with the SX Bet API. - [Authentication](https://docs.sx.bet/developers/authentication.md): Different operations on SX Bet require different levels of authentication. Here's what you need and why. - [Betting Delays](https://docs.sx.bet/developers/betting-delays.md): Betting delays by sport added to guard against toxic flow. - [Build with LLMs](https://docs.sx.bet/developers/build-with-llms.md): Use LLMs in your SX Bet integration workflow. - [Capital Efficiency](https://docs.sx.bet/developers/capital-efficiency.md): How SX Bet's capital efficiency system reduces locked escrow by recognizing hedged positions. - [Error Codes](https://docs.sx.bet/developers/error-codes.md): Reference of all error codes returned by the SX Bet API. - [The Exchange Model](https://docs.sx.bet/developers/exchange-model.md): How SX Bet works as a peer-to-peer prediction market exchange. - [External Partner API](https://docs.sx.bet/developers/external-partner-api.md): Leverage SX Bet markets and liquidity to power your platform with a dedicated partner integration. - [Fetching Markets](https://docs.sx.bet/developers/fetch-markets.md): Query active sports markets from the SX Bet API. - [Fetching Odds](https://docs.sx.bet/developers/fetching-odds.md): How to fetch current odds and orderbook data for a market. - [Fetching Trades](https://docs.sx.bet/developers/fetching-trades.md): Query trade history from the SX Bet API. - [Filling Orders](https://docs.sx.bet/developers/filling-orders.md): How to fill existing orders on the SX Bet orderbook as a taker. - [Glossary](https://docs.sx.bet/developers/glossary.md): Definitions of key terms used across the SX Bet API and developer docs. - [SX Bet Developer Hub](https://docs.sx.bet/developers/introduction.md): Build trading bots, custom frontends, and analytics tools on the SX Bet peer-to-peer sports prediction market. Explore quickstarts, API references, and real-time data guides. - [Latency & Server Locations](https://docs.sx.bet/developers/latency.md): Expected response times and server locations for the SX Bet API. - [Market Making on SX Bet](https://docs.sx.bet/developers/market-making.md): An overview of market making on SX Bet — how the maker role works, how to construct a spread, and how the pieces fit together. - [Market Making Parlays](https://docs.sx.bet/developers/market-making-parlays.md): How to listen for parlay requests, price them, and submit orders as a market maker. - [Markets](https://docs.sx.bet/developers/markets-and-sports.md): A deep dive into what a market is on SX Bet and everything you need to know to work with them. - [Overview](https://docs.sx.bet/developers/markets-overview.md): All market data on SX Bet is available through the API. No API key or account is required to fetch market data. - [Odds & Tokens](https://docs.sx.bet/developers/odds-and-tokens.md): How odds and tokens are represented on the SX Bet API - [Odds Rounding](https://docs.sx.bet/developers/odds-rounding.md): How to validate and round odds to the SX Bet odds ladder. - [Order Management](https://docs.sx.bet/developers/order-management.md): Monitor your open orders in real-time, cancel orders, and set up a heartbeat to protect against connectivity loss. - [Orderbook](https://docs.sx.bet/developers/orderbook-core.md): How the SX Bet orderbook is structured and how to read it. - [Parlays (RFQ System)](https://docs.sx.bet/developers/parlays.md): How SX Bet's request-for-quote parlay system works. - [Posting Orders](https://docs.sx.bet/developers/posting-orders.md): How to construct, sign, and submit maker orders to the SX Bet orderbook. - [Quarter Line Markets](https://docs.sx.bet/developers/quarter-line-markets.md): How quarter-line markets work on SX Bet - [Querying Balances](https://docs.sx.bet/developers/querying-balances.md): How to check your USDC balance on SX Bet using the blockchain explorer API. - [Quickstart](https://docs.sx.bet/developers/quickstart.md): Go from zero to your first bet on SX Bet. - [Rate Limits](https://docs.sx.bet/developers/rate-limits.md): Request limits for the SX Bet REST API. - [Real-time Data](https://docs.sx.bet/developers/real-time.md): Subscribe to live updates on markets, orders, trades, odds, and scores using the SX Bet WebSocket API. - [Slippage](https://docs.sx.bet/developers/slippage.md): How odds slippage works when filling orders on SX Bet. - [Testnet & Mainnet](https://docs.sx.bet/developers/testnet-and-mainnet.md): How to develop on SX Bet testnet and switch to mainnet when you're ready. - [Unit Conversions](https://docs.sx.bet/developers/unit-conversions.md): Converting between SX Bet's raw API values and human-readable formats. - [What Can You Build?](https://docs.sx.bet/developers/what-can-you-build.md): Explore the kinds of applications and tools you can build on top of SX Bet. - [What is SX Bet?](https://docs.sx.bet/developers/what-is-sx-bet.md): An overview of how SX Bet works as a peer-to-peer prediction market. - [Work With Us](https://docs.sx.bet/developers/work-with-us.md): Building at scale or exploring a partnership? Let's talk. - [Deposit From Coinbase](https://docs.sx.bet/user-guides/deposit-withdraw/deposit-from-coinbase.md): Learn how to deposit USDC on SX Bet directly from your Coinbase account. - [Deposit From Crypto Wallet](https://docs.sx.bet/user-guides/deposit-withdraw/deposit-from-wallet.md): Learn how to deposit USDC on SX Bet using your crypto wallet. - [Deposit With Interac e-Transfer](https://docs.sx.bet/user-guides/deposit-withdraw/interac.md): Learn how to deposit USDC on SX Bet using Interac e-Transfer. - [Large Withdrawals](https://docs.sx.bet/user-guides/deposit-withdraw/large-withdrawals.md): Use the Arbitrum Native Bridge to save on fees for large withdrawals. - [Deposit By Transferring Crypto](https://docs.sx.bet/user-guides/deposit-withdraw/transfer-crypto.md): Learn how to deposit USDC on SX Bet by transferring crypto from your wallet or exchange. - [Withdraw With Interac e-Transfer](https://docs.sx.bet/user-guides/deposit-withdraw/withdraw-interac.md): Withdraw your USDC to a Canadian bank account via Interac e-Transfer. - [Withdraw USDC to a Crypto Exchange](https://docs.sx.bet/user-guides/deposit-withdraw/withdraw-to-exchange.md): Want to cash your crypto in for real currency? Here is the guide. - [Export Your Wallet Into MetaMask](https://docs.sx.bet/user-guides/faq/export-wallet-metamask.md): Sign up with email? No problem — export your Fortmatic wallet into MetaMask. - [How Does SX Bet Work?](https://docs.sx.bet/user-guides/getting-started/how-it-works.md): Understand the peer-to-peer exchange model on SX Bet - [SX Bet Overview](https://docs.sx.bet/user-guides/getting-started/overview.md): The prediction market for sports — better odds, no fees, no limits. - [Quickstart](https://docs.sx.bet/user-guides/getting-started/quickstart.md): Sign up, fund your wallet, and place your first bet on SX Bet in minutes. - [Finding Markets](https://docs.sx.bet/user-guides/markets/finding-markets.md): How to search for events, switch between market types, and find alt lines on SX Bet. - [API Changelog](https://docs.sx.bet/user-guides/more/api-changelog.md) - [API Reference](https://docs.sx.bet/user-guides/more/api-reference.md) - [Betting Rules](https://docs.sx.bet/user-guides/more/betting-rules.md): Sport-specific rules that govern how bets are settled on SX Bet. - [Developer Guides](https://docs.sx.bet/user-guides/more/developer-guides.md) - [How to Use Bet Credits](https://docs.sx.bet/user-guides/rewards/bet-credits.md): Learn how to use bet credits on SX Bet. - [SX Bet Maker Rewards](https://docs.sx.bet/user-guides/rewards/maker-rewards.md): Earn USDC rewards by providing liquidity on SX Bet markets. - [Tournaments](https://docs.sx.bet/user-guides/rewards/tournaments.md): Compete for prizes with SX Bet Tournaments. - [Managing Positions](https://docs.sx.bet/user-guides/trading/capital-efficiency.md): Learn how SX Bet locks collateral and how you can unlock capital by trading both sides of a market. - [Fees](https://docs.sx.bet/user-guides/trading/fees.md): Learn about trading fees, gas fees, and bridging fees on SX Bet. - [Limit Orders (Maker)](https://docs.sx.bet/user-guides/trading/limit-orders.md): Place a limit order to offer odds and act as the bookmaker on SX Bet. - [Market Orders (Taker)](https://docs.sx.bet/user-guides/trading/market-orders.md): Place a market order to bet at the best available odds on SX Bet. - [Reading the Order Book](https://docs.sx.bet/user-guides/trading/order-book.md): Learn how to read the SX Bet order book to find available odds and liquidity. - [Peer-to-Peer Parlays](https://docs.sx.bet/user-guides/trading/parlays.md): Learn about peer-to-peer parlays on SX Bet. ## OpenAPI Specs - [openapi](https://docs.sx.bet/openapi.json)