Read live prices with requests
Authentication is a bearer token in the Authorization header. Every response has a data object and a meta object that tells you whether the key is a sandbox key, the feed delay and how many requests you have used.
import requests
API = "https://realtimebets.com/api/v1"
H = {"Authorization": "Bearer rtb_sb_your_key"}
events = requests.get(f"{API}/events", params={"status": "live"}, headers=H).json()
for e in events["data"]:
print(e["id"], e["home"], e["away"], e["score"])Each market in the response has a decimal price and its probability. Every price carries a fixed margin of about 6 percent, so if your book wants its own margin you apply it from the probability in your own code. Prices recompute every second and the live betting API stream pushes once a second over server-sent events, not WebSocket.
Check the stake before you accept the bet
The risk check is the call a feed does not give you. You post the customer, market, selection, stake and the price the customer saw. The answer is accepted, reduced with a max stake, or rejected with a reason.
r = requests.post(f"{API}/risk/check", headers=H, json={
"customer_ref": "cust_4410",
"event_id": "rp-tennis-1-3932",
"market_key": "pt:57",
"selection_key": "server",
"stake": 250,
"price": 1.52,
}).json()["data"]
if r["decision"] == "reduced":
stake = r["max_stake"] # 120, reason liability_limit
elif r["decision"] == "rejected":
reason = r["reason"] # market_closed or price_changedIn the docs example market liability is 9,880 against a 10,000 limit, so a stake of 250 is reduced to 120. A rejected bet for price_changed returns the current price, so your bet slip can ask the customer to accept it. The risk check comes with Growth and Enterprise. More on the logic is on the risk engine page.
Verify the signed settlement webhook
You record the bet with the same fields plus your own bet_id. When the market resolves, RealTimeBets posts a bet.settled webhook to your endpoint. The header carries a timestamp and an HMAC SHA-256 signature of the timestamp, a dot and the raw body.
import hmac, hashlib, time
def valid(header, body, secret):
parts = dict(p.split("=", 1) for p in header.split(","))
expected = hmac.new(secret.encode(), f"{parts['t']}.{body}".encode(), hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts["v1"]) and abs(time.time() - int(parts["t"])) < 300A bet of 40 at 1.52 that wins arrives with status won and payout 60.8. Your own wallet credits that amount, because the API never holds player funds and never calls a wallet. Each delivery is tried up to 3 times, so answer with any 2xx. The full flow is in the bookmaker API integration walkthrough and the API docs.
| Feature | Starter | Growth | Enterprise |
|---|---|---|---|
| Live in-play odds with probabilities | 3 sports | All sports and CS2 | All sports and CS2 |
| Requests a month | 500,000 | 5,000,000 | Fair use |
| Signed settlement webhooks | Yes | Yes | Yes |
| Risk check with liability and stake limits | No | Yes | Yes |
| Cash out quotes and execution | No | No | Yes |
| Price per month, billed monthly | $499 | $1,999 | $4,999 |
| Price per month, billed yearly | $249 | $999 | $2,499 |
Sandbox first, then a plan
Every new account gets one sandbox key: 1 sport, a 60 second delay, 1,000 requests in total and 7 days. That is enough to run the four calls above and replay matches with fictional teams, labelled Replay, at any hour. A production key needs a licence record in the console and an active plan. Choosing a plan reserves it at the listed price and nothing is charged yet.
- Starter, $499 a month ($249 billed yearly). Live odds for 3 sports, 500,000 requests a month, bet recording and settlement webhooks. No suspension and no risk check.
- Growth, $1,999 a month ($999 billed yearly). All sports and CS2, automatic suspension on micro-markets, the risk check, 5,000,000 requests a month.
- Enterprise, $4,999 a month ($2,499 billed yearly). Growth plus cash out quotes and execution.
The rate limit is 600 requests a minute per key. Size your polling with the odds feed sizing article.
Who it is for and who it is not for
It is for a Python developer or small team building the back end of a licensed sportsbook, or an agency building one for a licensed operator. You write the front end, accounts, payments, KYC and wallet. The engine supplies prices, suspension, the risk answer and the settlement result.
It is not a hosted sportsbook, a wallet, a source of other bookmakers' odds or a pre-match feed. Markets open at kickoff, so you get in-play prices only. Compare it with the wider sportsbook API page before you choose.