Overview
This guide covers the full flow for market making parlays on SX Bet: connecting to the WebSocket, receiving parlay requests, analyzing legs, calculating odds, and posting orders — all within the 3-second RFQ window.Step 1: Connect to the parlay channel
Subscribe to theparlay_markets:global WebSocket channel to receive parlay requests in real-time. You’ll need a token from the GET /user/realtime-token/api-key endpoint.
Step 2: Parse the parlay request
Each incoming message contains the parlay’smarketHash, the requested token and size, and the legs:
| Field | Description |
|---|---|
marketHash | The parlay market to post your order against |
baseToken | Token the bettor wants to bet in |
requestSize | Requested size in base token units (see unit conversion) |
legs | Array of individual markets and the outcomes the bettor selected |
The
requestSize is what the bettor requested, but you can offer any size you want. You are not limited to matching their request.Step 3: Look up each leg
Query each leg’s market viaGET /markets/find to understand what’s being bet on, and check current odds via GET /orders/odds/best:
Step 4: Calculate your odds
The simplest approach is to multiply the implied probabilities of each leg. Your pricing strategy is up to you — this is a basic example:The
percentageOdds field represents the maker’s implied probability in the SX protocol format (multiply by 10^20). The taker’s implied odds are 1 - percentageOdds / 10^20. See odds formats and unit conversion for details.Step 5: Post your order
Post an order to the parlaymarketHash using POST /orders/new, the same endpoint as single bets. The parlay market hash from the request is your marketHash. The executor address is available from GET /metadata.
Step 6: Manage your orders
After posting, you can cancel parlay orders the same way as any other order:Summary
The full maker flow at a glance:| Step | Action | Time constraint |
|---|---|---|
| 1 | Subscribe to parlay_markets:global channel | Once at startup |
| 2 | Receive parlay request with legs | — |
| 3 | Look up each leg’s market data | Within 3s |
| 4 | Calculate combined odds + your margin | Within 3s |
| 5 | Post order to the parlay marketHash | Within 3s |
| 6 | Optionally cancel if not filled | Anytime |
Related
Parlays (RFQ System) →
How the RFQ parlay system works conceptually.
Post New Order →
API reference for the order submission endpoint.
Order Signing →
How to sign orders for the SX Bet protocol.
WebSocket Parlay Requests →
WebSocket channel reference for parlay requests.
