Repository navigation
fix: add RFQ callbacks and exact trade quantity types - #13
Merged
Merged
Conversation
poly-william
approved these changes
Sep 29, 2026
watashi
pushed a commit
to watashi/polymarket-us-python
that referenced
this pull request
Oct 12, 2026
feat(streams): sports websocket stream
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.
Changes
Private RFQ frames currently reach only raw message listeners. Add an RFQ callback, subscription helper and complete payload types for all seven event variants. Preserve the original message and existing error handling.
Add the missing portfolio
Trade.qtyDecimalstring type and update the examples. Set the additive SDK version to 2.1.0.Part of ISVBE-936. This completes the remaining callback code; SDK publication and the MM heads-up remain follow-up work.
Testing
qtyDecimalfails the typed consumer.Checklist
pytest)ruff check .)mypy polymarket_us)Note
Low Risk
Additive SDK surface (types, subscription helper, dispatch); no changes to order/auth HTTP paths. WebSocket behavior for RFQ follows existing private-stream patterns.
Overview
Adds private WebSocket RFQ support so lifecycle frames are not limited to the raw
messagehandler. Callers can usesubscribe_rfq()withSUBSCRIPTION_TYPE_RFQ, listen onrfq_event, and type payloads withRFQEventplus exportedRFQ/Quotemodels covering all seven gateway variants (create/close RFQ and quote create/delete/accept/confirm/execute), including nullable nested objects.Also adds
Trade.qtyDecimalon portfolio activity trades for exact fractional quantities (alongside roundedqty), updates the WebSocket example and README, and bumps the package to 2.1.0. Regression tests use gateway-serialized RFQ fixtures over a local socket and assert emptyerrorstrings still deliver data callbacks.Reviewed by Cursor Bugbot for commit 94f0741. Bugbot is set up for automated code reviews on this repo. Configure here.