Labels: backend, enhancement, websocket, markets
Problem
Clients must poll for odds updates because there is no push channel delivering per-market odds changes in real time.
Requirements
- Add a subscribe/unsubscribe flow for per-market odds rooms in the gateway.
- Broadcast odds updates to a market's room when they change.
- Throttle broadcasts to a configurable max frequency.
- Clean up empty rooms and handle disconnects.
Acceptance Criteria
- Subscribers to a market receive odds updates without polling.
- Broadcast frequency respects the configured throttle.
- Rooms are cleaned up on last unsubscribe/disconnect.
- Tests cover subscribe, broadcast, and cleanup.
Files
backend/src/websocket/events.gateway.ts, backend/src/websocket/broadcaster.service.ts, backend/src/websocket/websocket.module.ts
Labels: backend, enhancement, websocket, markets
Problem
Clients must poll for odds updates because there is no push channel delivering per-market odds changes in real time.
Requirements
Acceptance Criteria
Files
backend/src/websocket/events.gateway.ts,backend/src/websocket/broadcaster.service.ts,backend/src/websocket/websocket.module.ts