Before you start
You need an API key, a funded account, and Python 3.10 or later with two libraries:1
Check the key over REST
A bad key fails the WebSocket handshake with HTTP 401 and a short
auth_rejected body. REST returns a JSON error with a named code, so check the key there first.2
Connect and take the initial sync
Collect events until the
sync marker. Every frame is a batch envelope, so iterate data[].3
Register for offers on one event
Events arrive without prices. Register the one you want and offers start flowing.
4
Read a bet type off an offer
Never construct a bet type by hand for your first order. Take one the feed has already given you, with liquidity on it.
5
Create a betslip
A betslip is the first step to place an order on one selection. Create it when you are ready to place. The response has no prices yet.
6
Wait for the quote
It arrives as a
pmm message on the socket you already hold. Give up if the betslip closes first.7
Place the order
Always send a
request_uuid. A retry with the same UUID cannot create a second order.8
Watch the order
Order and bet updates arrive on the same socket.An order starts
open, can pass through pending, and finishes done or failed, at which point closed is true. Later updates can show reconciled, partial_void or full_void. A done order is filled, not settled: profit_loss lands after the event finishes.What to add next
- A heartbeat, if the strategy runs unattended. See Safety.
- Error handling. Check
statusbefore readingdata, and honourretry_afteron a 429. See Errors and rate limits. - Reconnect logic. Treat the stream as lossy. On reconnect you get a fresh sync, so rebuild from that. See WebSocket stream.
The same flow with curl
SetSPORT, EVENT and BET from an offer first. The values below are examples.

