Skip to content

fix(ts-sdk): exclude markets missing resolutionDate in filterMarkets - #1990

Open
adamantmm wants to merge 1 commit into
pmxt-dev:mainfrom
adamantmm:fix/filter-markets-missing-resolution-date
Open

fix(ts-sdk): exclude markets missing resolutionDate in filterMarkets#1990
adamantmm wants to merge 1 commit into
pmxt-dev:mainfrom
adamantmm:fix/filter-markets-missing-resolution-date

Conversation

@adamantmm

Copy link
Copy Markdown

Summary

Fixes #1969.

When filterMarkets is called with a resolutionDate criterion, markets that have no resolutionDate set were incorrectly included in the TypeScript SDK. Core and the Python SDK already exclude them (if (!resDate) return false / if not val: continue).

This change mirrors that behavior in sdks/typescript/pmxt/client.ts.

How to test

  • Call filterMarkets(markets, { resolutionDate: { before: someDate } }) with a mix of markets that have and lack resolutionDate.
  • Markets without resolutionDate should be absent from the result (same as core / Python).

Checklist

  • Matches core BaseExchange.filterMarkets resolutionDate handling
  • No dependency or generated-spec changes required

Align the TypeScript SDK with core and the Python SDK: when filtering
by resolutionDate, markets without a date are excluded instead of
silently passing through.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

TypeScript SDK filterMarkets() includes markets with missing resolutionDate instead of excluding them

1 participant