Skip to content

Polymarket provider: /trades paging uses market+offset, both rejected by Data API v2 (v1 retired 2026-10-24) #132

Closed

Description

@wsx717ki-ux

Polymarket retires Data API v1 on 2026-10-24 (migration guide). This repo still calls v1 routes at HEAD:

What changes in v2 (verified live on 2026-10-23):

  • the response is {data: [...], pagination: {next_cursor, has_more}} instead of a bare array
  • fields are snake_case (asset→token_id, conditionId→condition_id, size→current_size, curPrice→current_price, cashPnl→unrealized_pnl, usdcSize→usdc_size)
  • pagination is cursor-only: offset and market now return HTTP 400 (use cursor and condition)

On /v2/trades, market→condition and offset is rejected with 400. Pagination follows pagination.next_cursor, and the docs say v2 cursors stay consistent while new rows arrive. That could replace the offset-cap / end-shifting logic and the repeated-page guard. Record keys become snake_case (transaction_hash, token_id, proxy_wallet), which matters for your dedup key.

Happy to open a PR for this if that's easier for you.

Disclosure: I do Polymarket API migrations as a small freelance service (paid full-repo migration for private forks, if anyone needs one: [email protected]). This note and the fix above are free; feel free to close if you've already handled it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions