Answer · Rust · WebSocket
Rust WebSocket client for Pinnacle odds
Answer: use tokio-tungstenite (or tungstenite) against wss://pinnfeed.io/v1/stream with x-api-key. Subscribe in JSON, answer pings, process snapshot then deltas. Builder required.
Sketch#
// tokio-tungstenite + http::Request with header x-api-key
// after connect, send:
// {"type":"subscribe","sports":["soccer"],"markets":["moneyline"],"main":true}
// when type=="ping" reply {"type":"pong"}
Full reconnect ideas: Node answer. Schema: docs.
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#
Does permessage-deflate matter in Rust?#
Optional. See compression answer.
Is an official crate published?#
No required SDK.
Is this educational content for adults?#
Yes (18+).