# SX Bet Documentation ## 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 - [Enabling betting](https://docs.sx.bet/api-reference/enabling-betting.md) - [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): This endpoint returns the best available odds for the specified baseToken and marketHashes or leagueIds. - [Fixtures](https://docs.sx.bet/api-reference/get-fixture-active.md): This endpoint returns current active fixtures for a particular league. A fixture can also be thought of as an event and multiple markets are under a particular event. - [Fixture status](https://docs.sx.bet/api-reference/get-fixture-status.md): This endpoint returns the status of the passed event IDs. - [Teams](https://docs.sx.bet/api-reference/get-league-teams.md): Returns all teams supported by SX.bet. Results are paginated starting at page 0 with a maximum of 500 records per page. - [Leagues](https://docs.sx.bet/api-reference/get-leagues.md): This endpoint returns all the leagues supported by SX.bet - [Active leagues](https://docs.sx.bet/api-reference/get-leagues-active.md): This endpoint returns all the currently active leagues with markets in them. Note that this endpoint is only updated every 10m. The response format is the same as the get leagues endpoint, with an additional field `eventsByType` which maps the number of unique events within a particular bet group (f… - [Live scores](https://docs.sx.bet/api-reference/get-live-scores.md): This endpoint retrieves live scores for a particular event ID. - [Active markets](https://docs.sx.bet/api-reference/get-markets-active.md): This endpoint retrieves active markets on the exchange. It does not return markets that have been settled or reported. - [Specific Markets](https://docs.sx.bet/api-reference/get-markets-find.md): This endpoint retrieves specific markets - [Popular markets](https://docs.sx.bet/api-reference/get-markets-popular.md): This endpoint retrieves the top 10 popular markets by volume. - [Metadata](https://docs.sx.bet/api-reference/get-metadata.md): This endpoint retrieves metadata on the exchange itself and useful parameters to interact with the exchange. - [Active orders](https://docs.sx.bet/api-reference/get-orders.md): This endpoint returns active orders on the exchange based on a few parameters - [Sports](https://docs.sx.bet/api-reference/get-sports.md): This endpoint retrieves all sports available on the exchange - [Active trades](https://docs.sx.bet/api-reference/get-trades.md): This endpoint retrieves past trades on the exchange split up by order. This is a paginated endpoint. For example, if a trade fills more than one order at once, it will show up as two entries for the bettor. - [Consolidated trades](https://docs.sx.bet/api-reference/get-trades-consolidated.md): This endpoint retrieves past consolidated trades on the exchange via pagination. If a trade fills multiple orders, it will show up as one entry here per bettor. - [Trades by orderHash](https://docs.sx.bet/api-reference/get-trades-orders.md): This endpoint retrieves trades on the exchange for the given orderHashes. - [Portfolio refunds](https://docs.sx.bet/api-reference/get-trades-refunds.md): This endpoint retrieves capital-efficient refund events for a bettor, aggregated by market. - [Heartbeat](https://docs.sx.bet/api-reference/heartbeat.md): Automatic order cancellation on connectivity loss - [API Reference](https://docs.sx.bet/api-reference/introduction.md): Be your own bookmaker or fill orders programmatically with the SX.bet API! - [Market Types](https://docs.sx.bet/api-reference/market-types.md) - [Odds ladder](https://docs.sx.bet/api-reference/odds-ladder.md) - [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) - [Cancel all orders](https://docs.sx.bet/api-reference/post-cancel-all.md): This endpoint cancels ALL existing orders on the exchange that you placed as a market maker. - [Cancel event orders](https://docs.sx.bet/api-reference/post-cancel-event.md): This endpoint cancels existing orders on the exchange for a particular event that you placed as a market maker. - [Cancel individual orders](https://docs.sx.bet/api-reference/post-cancel-orders.md): This endpoint cancels existing orders on the exchange that you placed as a market maker. If passed orders that do not exist, they simply fail silently while the others will succeed. - [Filling orders](https://docs.sx.bet/api-reference/post-fill-order.md) - [Register Heartbeat](https://docs.sx.bet/api-reference/post-heartbeat.md): To register and refresh your heartbeat with 0 > `timeoutSeconds` <= 3600. Ping this endpoint to maintain your heartbeat after initial registration. - [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): This endpoint offers new orders on the exchange (market making). Offering orders does not cost any fee. - [References](https://docs.sx.bet/api-reference/references.md): Endpoints, chain IDs, contract addresses, and network details for mainnet and testnet - [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 - [Active Order Updates](https://docs.sx.bet/api-reference/ws-active-order-updates.md): Subscribe to real-time changes in a user's orders - [Best Odds](https://docs.sx.bet/api-reference/ws-best-odds.md): Subscribe to real-time best odds changes - [Best Practices](https://docs.sx.bet/api-reference/ws-best-practices.md): Recommended patterns for combining HTTP requests with WebSocket subscriptions - [CE Refund Events](https://docs.sx.bet/api-reference/ws-ce-refund-events.md): Subscribe to real-time capital-efficiency refund events - [Consolidated Trade Updates](https://docs.sx.bet/api-reference/ws-consolidated-trade-updates.md): Subscribe to real-time consolidated trade updates - [Initialization](https://docs.sx.bet/api-reference/ws-initialization.md): Connect to the SX Bet real-time WebSocket API using Ably - [Line Changes](https://docs.sx.bet/api-reference/ws-line-changes.md): Subscribe to real-time line changes - [Live Score Updates](https://docs.sx.bet/api-reference/ws-live-score-updates.md): Subscribe to real-time live score changes for a specific event - [Market Updates](https://docs.sx.bet/api-reference/ws-market-updates.md): Subscribe to real-time market changes - [Order Book Updates](https://docs.sx.bet/api-reference/ws-order-book-updates.md): Subscribe to real-time changes in a market's order book - [Websocket API](https://docs.sx.bet/api-reference/ws-overview.md): Real-time data via the SX Bet WebSocket API - [Parlay Market Requests](https://docs.sx.bet/api-reference/ws-parlay-market-requests.md): Subscribe to real-time parlay market requests - [Trade Updates](https://docs.sx.bet/api-reference/ws-trade-updates.md): Subscribe to real-time trade updates - [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 and high spikes in latency. - [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. - [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 - [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) Built with [Mintlify](https://mintlify.com).