You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: fix field names to match actual snake_case API responses
All JSON examples and code samples across WebSocket, SSE, and example
docs were using camelCase (eventId, marketType, evPercent, profitPercent)
or raw Redis field names (hash_id, normalized_market, game_id) instead
of the actual public API snake_case format from transforms.ts.
Updated: websocket.mdx, stream.mdx, value-betting.mdx, arbitrage-scanner.mdx
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@@ -210,7 +210,7 @@ data: {"code":"upstream_error","message":"Temporary issue fetching DraftKings da
210
210
211
211
## Reconnection
212
212
213
-
SSE supports automatic reconnection via the `Last-Event-ID` header. Each event includes an `id` field. When the client reconnects, it sends the last received `id` and the server replays any missed events.
213
+
SSE supports automatic reconnection via the `Last-Event-ID` header. Each event includes an `id` field. When the client reconnects, the server delivers a **fresh full snapshot** — not a replay of individual missed events. This means your client receives a complete, up-to-date picture on every reconnect.
214
214
215
215
```javascript
216
216
// Browsers handle this automatically with EventSource.
@@ -221,8 +221,12 @@ const headers = {
221
221
};
222
222
```
223
223
224
+
<Callouttype="warning">
225
+
On reconnect, **clear your local state** before processing the new snapshot. The `connected` event includes `"reconnected": true` so you can detect this. If you don't clear state, stale odds from the previous session will mix with fresh data.
226
+
</Callout>
227
+
224
228
<Callouttype="info">
225
-
Browser `EventSource` handles `Last-Event-ID` automatically. No extra code needed for reconnection in browsers.
229
+
Browser `EventSource` handles `Last-Event-ID`and reconnection automatically. No extra code needed for the reconnect itself, but you must handle clearing state on the client side.
@@ -201,6 +213,10 @@ Snapshot of opportunities for a single channel type. Sent once per subscribed op
201
213
202
214
The top-level key matches the channel type: `ev`, `arbitrage`, `middles`, or `low_hold`. Each snapshot message contains only one type. Large snapshots are automatically chunked — when this happens, messages include `chunk` and `totalChunks` fields.
203
215
216
+
<Callouttype="info">
217
+
All opportunity fields use **snake_case** naming (e.g. `event_id`, `market_type`, `profit_percent`, `detected_at`). This applies consistently across all channels, message types, and protocols (REST, SSE, and WebSocket).
218
+
</Callout>
219
+
204
220
#### `initial`
205
221
206
222
Per-sportsbook odds snapshot. Sent once per sportsbook when the `odds` channel is subscribed. Requires the `odds` channel.
@@ -279,15 +295,27 @@ New +EV opportunity found. Pro tier or higher only.
0 commit comments