API de movimiento de línea Pinnacle
Respuesta: PinnFeed da tres piezas: el stream live (delta en el WebSocket Builder), caídas recientes (GET /v1/drops) y el precio de cierre (GET /v1/closing, Builder). No hay endpoint de historial tick-a-tick: para un gráfico completo registra los deltas desde la suscripción.
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/mes). Prueba de 3 días; tarjeta requerida. REST gratis: signup. Related: dropping odds, closing/CLV.
Preguntas frecuentes#
¿Hay historial tick-a-tick?#
No. Registra los deltas tú mismo.
¿Contenido educativo para adultos?#
Sí (18+).
Contenido educativo para mayores de 18 años. Sin pronósticos ni ganancias garantizadas. En España, apuesta solo con operadores con licencia de la DGOJ.