Conversation
Nsreddy18
commented
Jan 17, 2026
There was a problem hiding this comment.
Pull request overview
This pull request adds WebSocket functionality to monitor live Bitcoin prices from Polymarket's Chainlink price feed in real-time. The implementation tracks 15-minute price windows and calculates price differences from a baseline "price to beat."
Changes:
- Added new
PolymarketLiveMonitorclass for WebSocket-based live Bitcoin price streaming - Added
websocketsdependency to requirements.txt
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| utils/fetchPolymarketLivePrice.py | New monitoring class that connects to Polymarket WebSocket API to stream real-time Bitcoin prices and track 15-minute price windows |
| requirements.txt | Added websockets library dependency with version constraint >=12.0,<13.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
implemented all the review comments and resolved them |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 2 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ts_str = str(ts_raw) | ||
| print(f"[Warning] Bad timestamp received: {ts_raw!r} ({e})") |
There was a problem hiding this comment.
When timestamp parsing fails and dt is None, the code continues to calculate and display price information. However, this means price updates without valid timestamps are still printed, which could be confusing and makes it impossible to track when these prices occurred. Consider skipping messages with invalid timestamps.
| ts_str = str(ts_raw) | |
| print(f"[Warning] Bad timestamp received: {ts_raw!r} ({e})") | |
| print(f"[Warning] Bad timestamp received: {ts_raw!r} ({e})") | |
| # Skip this message since we cannot reliably determine when it occurred | |
| continue |
There was a problem hiding this comment.
we are getting time stamp from and using that in case of any exception, ref "ts_raw"