Skip to content

fix: migrate getMarketMetadata to /markets/keyset endpoint - #3

Merged
moose-code merged 1 commit into
mainfrom
merge/v2
Apr 23, 2026
Merged

fix: migrate getMarketMetadata to /markets/keyset endpoint#3
moose-code merged 1 commit into
mainfrom
merge/v2

Conversation

@moose-code

Copy link
Copy Markdown
Owner

Polymarket is deprecating the flat /markets endpoint on 2026-05-01 in favour of the cursor-paginated /markets/keyset. Our use case is a point lookup (single tokenId, not a list scan), and the new endpoint accepts the same clob_token_ids filter — only the response shape changes from a bare array to { markets: [...] }.

Unwrapping the envelope keeps the effect's output shape identical, so call sites (ensureMarket in CTFExchangeV2/Exchange handlers) need no changes.

Polymarket is deprecating the flat /markets endpoint on 2026-05-01 in
favour of the cursor-paginated /markets/keyset. Our use case is a
point lookup (single tokenId, not a list scan), and the new endpoint
accepts the same clob_token_ids filter — only the response shape
changes from a bare array to { markets: [...] }.

Unwrapping the envelope keeps the effect's output shape identical,
so call sites (ensureMarket in CTFExchangeV2/Exchange handlers) need
no changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@moose-code
moose-code merged commit f56fe44 into main Apr 23, 2026
1 check failed
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