Answer · Go · WebSocket
Go WebSocket client for Pinnacle odds
Answer: dial wss://pinnfeed.io/v1/stream, set header x-api-key: ps_live_..., send a JSON subscribe, reply to ping with pong about every 20s, and reconnect with backoff. Builder (€99/mo) required.
Sketch (gorilla/websocket)#
// go get github.com/gorilla/websocket
hdr := http.Header{}
hdr.Set("x-api-key", os.Getenv("PINNFEED_KEY"))
c, _, err := websocket.DefaultDialer.Dial("wss://pinnfeed.io/v1/stream", hdr)
// write: {"type":"subscribe","sports":["soccer"],"markets":["moneyline"],"main":true}
// on {"type":"ping"} write {"type":"pong"}
Protocol details: snapshot/delta, ping/pong, Node reconnect.
Trial CTA#
Builder (€99/mo) for the live + prematch WebSocket and closing history. 3-day trial; card required, charged after day 3 unless cancelled. Free delayed REST: signup. Related: answers hub, docs, pricing.
Questions people ask#
Is there an official Go SDK?#
No — plain WebSocket + JSON is enough.
Can I pass the key as a query param?#
Yes — /v1/stream?key=ps_live_... is supported; prefer the header when your client allows it.
Is this educational content for adults?#
Yes (18+).