Sports betting bot architecture on Pinnacle odds
Answer: most betting or trading bots have five parts: (1) a data feed, (2) a local state of events and markets, (3) signal rules, (4) risk checks, and (5) execution on the account you bet with. PinnFeed fills part 1 and helps with 2–3: a WebSocket (Builder) that sends a full snapshot and then delta frames with every Pinnacle price change, including fair, margin and maxStake. It does not place bets; execution is yours, on a book that allows it, where betting is legal for you.
The pipeline#
| Part | What it does | With PinnFeed |
|---|---|---|
| Ingest | Keep one connection open, answer ping with pong, reconnect with backoff | wss://pinnfeed.io/v1/stream (Python, Node) |
| State | Map of market.id → latest market; drop on op: "remove" | snapshot/delta |
| Signals | Price drop, offer above fair, line change | steam, EV screen |
| Risk | Stake caps, maxStake >= 100, max exposure per event, kill switch | Your code |
| Execution | Place the bet, log price and result | Your bookmaker or exchange |
Minimal signal loop (Python)#
book = {} # market id -> market
def on_frame(msg, alert):
if msg["type"] == "snapshot":
for m in msg["markets"]:
book[m["id"]] = m
elif msg["type"] == "delta":
for ch in msg["changes"]:
if ch["kind"] != "market":
continue
if ch["op"] == "remove":
book.pop(ch["id"], None)
continue
new, old = ch["market"], book.get(ch["market"]["id"])
book[new["id"]] = new
if not old or (new["maxStake"] or 0) < 100:
continue
for o_new, o_old in zip(new["outcomes"], old["outcomes"]):
if o_old["decimal"] and o_new["decimal"] / o_old["decimal"] - 1 <= -0.04:
alert(new["eventId"], o_new["name"], o_old["decimal"], o_new["decimal"])
Plug on_frame into any client from the language pages (Go, Rust, Kotlin). Log every signal and decision so you can measure it later against the close: bet tracker with CLV.
Design tips#
- Run ingest on an always-on host, not a serverless function.
- Keep a
papermode that logs what the bot would do before it bets anything. - Use one WebSocket per process and fan out internally; Builder allows 3 connections, Pro 10.
- Handle
4008 slow_consumerby moving work off the receive loop.
Plans#
Builder (€99/mo): WebSocket, all 13 sports, all markets. Pro (€199/mo): 10 connections and raw frames. 3-day trial; a card is required and it is charged after day 3 unless you cancel. Prototype on Free REST first: signup.
Educational content for adults (18+). Automated betting can lose money quickly; no tips, no guaranteed profit.
Related: startup MVP on Pinnacle odds, open-source betting bot, algorithmic sports betting.
Questions people ask#
Can PinnFeed place bets for my bot?#
No. It is read-only data. Execution happens on your own bookmaker or exchange account.
Is a bot allowed by bookmakers?#
Many books restrict automated betting in their terms. Check before you automate execution.
Can I build it with an AI coding tool?#
Yes: build a betting bot with Cursor and vibe coding.