API di line movement Pinnacle
Risposta: PinnFeed dà tre pezzi: lo stream live (delta sul WebSocket Builder), i calo recenti (GET /v1/drops) e il prezzo di chiusura (GET /v1/closing, Builder). Non c'è un endpoint di storico tick-by-tick: per un grafico completo registra i delta dall'iscrizione. Lo script sotto scrive ogni cambio in SQLite.
Record deltas (Python, Builder)#
# pip install websockets
import asyncio, json, os, sqlite3, time, websockets
db = sqlite3.connect("moves.db")
db.execute("create table if not exists moves(ts real, market_id text, event_id int, type text, line real, outcome text, decimal real)")
async def main():
url = "wss://pinnfeed.io/v1/stream"
async with websockets.connect(url, additional_headers={"x-api-key": os.environ["PINNFEED_KEY"]}, max_size=None) as ws:
await ws.send(json.dumps({"type": "subscribe", "sports": ["soccer"], "markets": ["moneyline", "total"], "main": True}))
async for raw in ws:
msg = json.loads(raw)
if msg["type"] == "ping":
await ws.send(json.dumps({"type": "pong"}))
elif msg["type"] == "delta":
for ch in msg["changes"]:
if ch["kind"] == "market" and ch["op"] == "upsert":
m = ch["market"]
for o in m["outcomes"]:
db.execute("insert into moves values(?,?,?,?,?,?,?)",
(time.time(), m["id"], m["eventId"], m["type"], m.get("line"), o["name"], o["decimal"]))
db.commit()
asyncio.run(main())
CTA#
Builder (99 €). 3-day trial; card required, charged after day 3 unless cancelled. Free REST: signup. Related: dropping odds, closing/CLV.
Domande frequenti#
C'è uno storico tick-by-tick?#
No. Registra i delta tu.
Contenuto educativo per adulti?#
Sì (18+).
Contenuto educativo per maggiorenni (18+): non pronostici né promesse di guadagno. In Italia scommetti solo con operatori autorizzati ADM.