This quickstart walks you through the essentials of programmatic betting on SX Bet. By the end, you’ll have fetched live markets, read current odds, and filled a real order.Documentation Index
Fetch the complete documentation index at: https://docs.sx.bet/llms.txt
Use this file to discover all available pages before exploring further.
What you’ll need
- An account on SX Bet (for signing orders)
- USDC (to fill an order)
Market data and orderbook reads are public — no authentication needed. You only need an account for posting or filling orders.
Base URL
All API requests go to:Install dependencies
Create an account
Sign up at sx.bet with email or Google. Complete registration by choosing a username.Fetch your private key from the assets page. You will need this to sign orders through the API.Store it securely in a
.env file:Fetch a market
Fetch active markets to find one you want to bet on. Copy the
marketHash — you’ll need it in the next steps.Fetch current odds
Get the best available odds for your market (from the maker’s perspective) using the
marketHash from the previous step. You’ll use these to derive your taker odds in the next step.If your fill returns
"status": "success", you’re live on mainnet. Check your open positions at sx.bet/my-bets.Core Concepts
Understand how the exchange and orderbook work in depth.
Filling Orders
Step-by-step guide to signing and submitting fills.
