You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeScript SDK filterMarkets() includes markets with missing resolutionDate instead of excluding them #1969
When a caller filters markets by resolutionDate and a given market has no resolutionDate set, core (and the Python SDK) correctly excludes that market from the results. The TypeScript SDK's reimplementation of this filter does the opposite: it silently lets the market pass the filter.
Core
core/src/BaseExchange.ts:1434-1444 — inside the ResolutionDate filter block: if (criteria.resolutionDate) { const resDate = market.resolutionDate; if (!resDate) return false; ... }. A market with no resolutionDate is explicitly excluded whenever the caller filters on resolutionDate.
TypeScript SDK
sdks/typescript/pmxt/client.ts:3088-3096 — the condition is if (criteria.resolutionDate && market.resolutionDate) { ... }. When market.resolutionDate is falsy, the entire block is skipped, so the market is never excluded and passes the filter instead.
Python SDK
Matches core correctly: sdks/python/pmxt/client.py:2217-2227 explicitly does if not val: continue (excludes) when resolutionDate is missing.
Evidence
Direct read of core/src/BaseExchange.ts:1430-1446 vs sdks/typescript/pmxt/client.ts:3080-3100 vs sdks/python/pmxt/client.py:2217-2227 confirms the TypeScript condition (criteria.resolutionDate && market.resolutionDate) diverges from both core's and Python's (if (!resDate) return false / if not val: continue).
Impact
exchange.filterMarkets(markets, { resolutionDate: {...} }) in the TypeScript SDK silently returns markets that should have been filtered out whenever market.resolutionDate is unset — a data-correctness bug specific to the TypeScript client-side reimplementation of this filter.
Found by automated Core-to-SDK surface coverage audit
Closing as duplicate of #1555. Same underlying finding: filterMarkets/filter_markets treat a market missing resolutionDate oppositely (TypeScript includes it, Python/core exclude it). Relevant context has been copied over.
Activity
realfishsam commentedon Aug 10, 2026
Closing as duplicate of #1555. Same underlying finding:
filterMarkets/filter_marketstreat a market missingresolutionDateoppositely (TypeScript includes it, Python/core exclude it). Relevant context has been copied over.Generated by Claude Code
filterMarkets/filter_marketstreat a market missingresolutionDateoppositely — included in TypeScript, excluded in Python #1555