Skip to Content
PredictorSDK

SDKs 0.23.0 page through results and follow the 0.23 API

The TypeScript, Python, and Go SDKs 0.23.0 return pages you can iterate, add the lookup method and the list filters, type the new schedule fields, and say provider where they said platform.

SDKBreaking

The TypeScript (@predictorsdk/client), Python (predictorsdk), and Go (github.com/PredictorSDK/sdk-go) SDKs are released at 0.23.0 for the 0.23 API release shipped the same day. Upgrade now if you use Python: 0.22.0 and earlier fail to parse three responses whose required fields moved, events (platform is now provider), crypto prices (prices is now data) and wallet positions (pagination.total can be null).

  • Paginated calls return a page you can iterate. getSportsMatchingMarkets, getMarkets, getBinanceCryptoPrices and listPolymarketWalletPositions (snake_case in Python) now return a page instead of the response body. Iterating it visits every item on every page, sending each next cursor and repeating your filters: for await (const item of page) in TypeScript, for item in pager in Python, and page.Iterator() in Go. The current page's items are page.data in TypeScript, pager.items in Python and page.Results in Go, and the whole response, with snapshot and pagination, is response (Response in Go). See Pagination.
  • Lookups have their own method. lookupSportsMatchingMarkets (lookup_sports_matching_markets, LookupSportsMatchingMarkets) takes eventId and sourceId and returns data, lookups and snapshot. getSportsMatchingMarkets no longer takes identifiers; it takes the new league, scheduledDate and participant filters.
  • Matched events carry their schedule. scheduledDate is a date (a string in TypeScript, datetime.date in Python, time.Time in Go) and scheduledStart is a timestamp or null (Date | null, Optional[datetime], *time.Time).
  • provider replaces platform on getMarket and getEvent and on the event response. In Go the request types are GetMarketRequestProvider and GetEventRequestProvider; a matching row's Provider converts to either with a plain type conversion.
  • Crypto prices and total. getBinanceCryptoPrices takes cursor and returns data and pagination, and pagination.total is nullable (number | null, Optional[int], *int) on every paginated response.
  • Two generator bugs are fixed before they shipped. A Go paginated method called with a nil request no longer panics, and the TypeScript pager no longer writes its cursor into the request object you passed, so reusing that object starts from the first page.

We checked every published package against the production API before announcing it: each one paged through matched events, filtered by league, found an event through the lookup method, read market detail and the event with provider, and paged through a minute of crypto prices.