Skip to content

fix: polymarket deprecated endpoint update#233

Open
nikbpetrov wants to merge 2 commits into
forecastingresearch:mainfrom
nikbpetrov:polymarket-api-deprecation
Open

fix: polymarket deprecated endpoint update#233
nikbpetrov wants to merge 2 commits into
forecastingresearch:mainfrom
nikbpetrov:polymarket-api-deprecation

Conversation

@nikbpetrov

@nikbpetrov nikbpetrov commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

closes #194

No clue actually why the liquidity_num_min param was not used for server-side filtering; it results in more consistent behaviour and 10x fewer requests; i've tested and validated this param and it works as expected; the 5ff64b0 commit adds this (still keeping the client-side filtering for robustness)

fixes a dormant bug where the /markets endpoint can only offset up to 2500, while the qualifying markets are ~1000 more at the moment. Verified with:

> curl -sS -w '\nHTTP %{http_code}\n' \
  'https://gamma-api.polymarket.com/markets?limit=500&active=true&closed=false&archived=false&order=liquidity&ascending=false&offset=2500'
> {"type":"validation error","error":"offset too large, use /markets/keyset for deeper pagination"}

HTTP 422

Update deprecated endpoint, add server-side liquidity_num_min filtering,
fix request limiting, and dedupe fetched markets.

Closes forecastingresearch#194
@nikbpetrov nikbpetrov force-pushed the polymarket-api-deprecation branch from 19a9225 to f5a3f87 Compare June 30, 2026 11:51
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.

Polymarket API endpoint is deprecated and has already been sunset

1 participant