Exchange
polymarket
Drift Type
changed_response / changed_params
Severity
HIGH — callApi('getTrades', ...) in fetcher.ts will receive a paginated object instead of an array; all trade fetching is silently broken
Their Docs
The live Data API for GET /trades now returns a paginated envelope:
{ "limit": 100, "next_cursor": "...", "count": 42, "data": [...] }
Previously it returned a bare array. Additionally, the filter parameter was renamed from maker (optional) to maker_address (required). A new next_cursor pagination parameter was also added.
Source: https://data-api.polymarket.com docs (confirmed via Polymarket docs site)
Our Cached Spec
core/specs/polymarket/Polymarket_Data_API.yaml — GET /trades response schema is type: array with no pagination wrapper. The query parameter is named maker (optional), not maker_address (required).
File: core/specs/polymarket/Polymarket_Data_API.yaml
File: core/src/exchanges/polymarket/api-data.ts
callApi() References at Risk
callApi('getTrades', queryParams) at fetcher.ts:281 (fetchRawTrades)
callApi('getTrades', queryParams) at fetcher.ts:295 (fetchRawMyTrades)
callApi('getTrades', { user: address, limit: 20 }) at index.ts:789 (fetchWatchedAddressActivity)
All three call sites receive the paginated wrapper object instead of an array, causing downstream code to fail silently (treating { limit, next_cursor, count, data } as an empty trade list).
Note: existing issue #792 covers the same pattern for GET /data/orders — this is the same problem on GET /data/trades.
Hardcoded URL Bypasses
None for this endpoint
Impact
fetchRawTrades, fetchRawMyTrades, and fetchWatchedAddressActivity all return empty or malformed results. The maker → maker_address rename also means trade filtering by maker address no longer works.
Fix: Update the Data API spec to wrap the /trades response in a paginated envelope schema; rename the maker param to maker_address; update fetcher.ts to extract .data from the paginated response.
Found by automated spec drift audit
Exchange
polymarket
Drift Type
changed_response / changed_params
Severity
HIGH —
callApi('getTrades', ...)infetcher.tswill receive a paginated object instead of an array; all trade fetching is silently brokenTheir Docs
The live Data API for
GET /tradesnow returns a paginated envelope:{ "limit": 100, "next_cursor": "...", "count": 42, "data": [...] }Previously it returned a bare array. Additionally, the filter parameter was renamed from
maker(optional) tomaker_address(required). A newnext_cursorpagination parameter was also added.Source: https://data-api.polymarket.com docs (confirmed via Polymarket docs site)
Our Cached Spec
core/specs/polymarket/Polymarket_Data_API.yaml—GET /tradesresponse schema istype: arraywith no pagination wrapper. The query parameter is namedmaker(optional), notmaker_address(required).File:
core/specs/polymarket/Polymarket_Data_API.yamlFile:
core/src/exchanges/polymarket/api-data.tscallApi() References at Risk
callApi('getTrades', queryParams)atfetcher.ts:281(fetchRawTrades)callApi('getTrades', queryParams)atfetcher.ts:295(fetchRawMyTrades)callApi('getTrades', { user: address, limit: 20 })atindex.ts:789(fetchWatchedAddressActivity)All three call sites receive the paginated wrapper object instead of an array, causing downstream code to fail silently (treating
{ limit, next_cursor, count, data }as an empty trade list).Note: existing issue #792 covers the same pattern for
GET /data/orders— this is the same problem onGET /data/trades.Hardcoded URL Bypasses
None for this endpoint
Impact
fetchRawTrades,fetchRawMyTrades, andfetchWatchedAddressActivityall return empty or malformed results. Themaker→maker_addressrename also means trade filtering by maker address no longer works.Fix: Update the Data API spec to wrap the
/tradesresponse in a paginated envelope schema; rename themakerparam tomaker_address; updatefetcher.tsto extract.datafrom the paginated response.Found by automated spec drift audit