Skip to content

feat: add RFQ trade history support - #15

Merged
harley-poly merged 1 commit into
mainfrom
harley/python-rfq-trades
Oct 6, 2026
Merged

harley-poly merged 1 commit into
mainfrom
harley/python-rfq-trades

Conversation

@harley-poly

@harley-poly harley-poly commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Changes

Add rfqs.trades() to both Python clients for authenticated RFQ trade history, with typed filters, responses and the existing live rfqTrade event. Preserve decimal strings, timestamps and opaque cursors through the existing transport.

Document manual pagination, empty continuation pages and recovery from the live stream using overlapping queries and trade-ID deduplication. These are anonymous original fills; later corrections and busts are not reflected.

Follows https://github.com/Polymarket/go-gateway-us/pull/2307. Sets version 2.3.0. This is independent of #14 and will release first; the batch-order follow-up will use 2.4.0.

Testing

  • 223 tests pass on Python 3.13/websockets 17.2 and Python 3.10/websockets 13.0.
  • 17 new tests cover signed requests, filters/cursors, exact response values, empty-page continuation, authentication/API errors and live payloads over a local WebSocket.
  • Typed consumers cover both clients and nullable trade/timestamp fields. Ruff lint/format, mypy and wheel/sdist build pass.
  • No live API or trading calls.

Checklist

  • Tests pass (pytest)
  • Linting passes (ruff check .)
  • Types check (mypy polymarket_us)

Note

Low Risk
Additive SDK surface (new resource method and types) with tests; no changes to order placement or core auth transport beyond a new authenticated GET.

Overview
Adds authenticated RFQ trade history via client.rfqs.trades() on sync and async clients, calling GET /v1/rfqs/trades with typed GetRFQTradesParams / GetRFQTradesResponse and RFQTrade records (decimal strings, cursor pagination).

Extends private rfq_event typings with rfqTrade so live anonymous RFQ fills match the history shape. README documents manual pagination, empty pages with nonempty cursors, eventual consistency, and gap recovery via overlapping queries and tradeId deduplication.

Bumps package version to 2.3.0 and adds HTTP/WebSocket regression tests for signing, filters, auth/errors, and live rfqTrade callbacks.

Reviewed by Cursor Bugbot for commit cdd9952. Bugbot is set up for automated code reviews on this repo. Configure here.

@harley-poly
harley-poly merged commit c81835d into main Oct 6, 2026
11 checks passed
@harley-poly harley-poly mentioned this pull request Oct 6, 2026
3 tasks done
@harley-poly
harley-poly deleted the harley/python-rfq-trades branch October 9, 2026 20:55
watashi pushed a commit to watashi/polymarket-us-python that referenced this pull request Oct 12, 2026
feat(streams): clob user websocket stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants