fix: parse current market price changes#117
Merged
Merged
Conversation
cgfixit
marked this pull request as ready for review
July 13, 2026 07:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
price_changepayloads fromprice_changes[]price_changeand current top-levellast_trade_pricehandlingRoot cause
The current Polymarket market channel nests changed token prices under
price_changes[]. The shared parser looked only for top-levelasset_idandprice, so valid current events produced no ticks and open-position risk evaluation could miss updates.Impact
Current market-channel events reach the existing price callback. Subscription behavior and pricing/risk calculations are unchanged.
Validation
pytest tests/test_monitor.py tests/test_chaos.py -q -p no:cacheprovider— 71 passedpython -m py_compile polymarket_copier/core/monitor.py tests/test_monitor.py— passedruff check polymarket_copier/core/monitor.py tests/test_monitor.py— passedruff format --check polymarket_copier/core/monitor.py tests/test_monitor.py— passedgit diff --check— cleanRisk
Low and isolated to WebSocket message normalization. No REST polling, subscription, order, wallet, or persistence code changed.
Reference: https://docs.polymarket.com/market-data/websocket/market-channel