Skip to content

feat: add combo market catalog#86

Closed
cesarenaldi wants to merge 1 commit into
mainfrom
feat/combo-market-catalog
Closed

feat: add combo market catalog#86
cesarenaldi wants to merge 1 commit into
mainfrom
feat/combo-market-catalog

Conversation

@cesarenaldi

@cesarenaldi cesarenaldi commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Adds typed Combo market catalog support to the Python SDK via list_combo_markets on sync/async public and secure clients.\n\nVerification:\n- uv run ruff format src/polymarket tests/unit/test_builder_trades.py tests/unit/test_streams_subscribe_router.py\n- uv run ruff check src/polymarket tests/unit/test_builder_trades.py tests/unit/test_streams_subscribe_router.py\n- uv run pyright\n- uv run pytest tests/unit/test_builder_trades.py tests/unit/test_streams_subscribe_router.py\n- Live smoke: PublicClient().list_combo_markets(page_size=1).first_page()


Note

Low Risk
Additive read-only public API and transport plumbing; existing keyset pagination keeps default after_cursor behavior.

Overview
Adds typed Combo market catalog support: clients can page through RFQ combo-eligible markets via list_combo_markets, with optional exclude of CTF condition IDs.

Wires a new rfq HTTP service (environment.rfq_url, dedicated transport on sync/async public and secure clients, lifecycle close). KeysetPaginatedSpec gains a configurable cursor_param (default after_cursor); combo markets use cursor for pagination. New ComboMarket models normalize the API’s parallel outcome/price arrays into yes/no outcomes.

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0fbae90. Configure here.

elif isinstance(raw_cursor, str) and raw_cursor:
next_cursor = raw_cursor
else:
raise UnexpectedResponseError("Combo market next_cursor did not match expected shape")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing LTE pagination sentinel

Medium Severity

_parse_combo_markets_page treats any non-empty next_cursor string as a real cursor. Elsewhere in this SDK, LTE= is the documented end-of-pagination sentinel and is normalized to no next page via next_cursor_or_none. If the RFQ combo-markets API uses that sentinel, callers will see has_more true and issue another request with cursor=LTE= instead of stopping.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0fbae90. Configure here.

@cesarenaldi cesarenaldi deleted the feat/combo-market-catalog branch June 10, 2026 08:37
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.

1 participant