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
SDK drift: Python exports named reusable filter-shape types (MinMax, DateRange, PriceFilter, VenueFilter, OutcomeType) that TypeScript only inlines anonymously #1441
Python declares five standalone, importable type aliases/TypedDicts for filter-parameter shapes that TypeScript only ever writes as anonymous inline object/union types embedded inside other interfaces. This is the same "named vs. anonymous type" drift pattern as the already-filed TxPayload issue (#1168), but affects a distinct, larger set of types not covered by that issue.
Python SDK
sdks/python/pmxt/models.py:
MinMax (lines 677-680): {min: float, max: float} — used for volume_24h, volume, liquidity, open_interest, market_count, total_volume.
DateRange (lines 682-685): {before: datetime, after: datetime} — used for resolution_date.
PriceFilter (lines 687-691): {outcome: OutcomeType, min: float, max: float} — used for price/price_change_24h.
VenueFilter (line 845): Union[str, List[str]] — used for venues/exclude_venues (lines 859-860, 882-883).
OutcomeType (line 20): Literal["yes", "no", "up", "down"] — used at PriceFilter.outcome (line 689).
TypeScript SDK
No equivalents exist as named/exported types anywhere in sdks/typescript/pmxt/models.ts (confirmed via search). The identical shapes are inlined at:
lines 874, 877, 880, 883: { min?: number; max?: number } repeated 4x for volume24h/volume/liquidity/openInterest
lines 886-889: resolutionDate?: { before?: Date; after?: Date }
lines 898-902, 905-909: price/priceChange24h, each inlining outcome: 'yes'|'no'|'up'|'down'; min?: number; max?: number
lines 934, 937: marketCount/totalVolume: { min?: number; max?: number }
TypeScript should export named types (MinMax, DateRange, PriceFilter, VenueFilter, OutcomeType) mirroring the Python shapes, so consumers of either language can reference the same reusable type by name.
Impact
Python consumers can import and reuse MinMax/DateRange/PriceFilter/VenueFilter/OutcomeType in their own function signatures or validation logic; TypeScript consumers have no importable equivalent and must either redefine the shape inline or reach for awkward indexed-access types (e.g. MarketFilterCriteria['volume']).
Additional context from duplicate #2075: the OutcomeType union is inlined twice in MarketFilterCriteria in TS (sdks/typescript/pmxt/models.ts:911 and :918) vs. OutcomeType = Literal["yes","no","up","down"] at sdks/python/pmxt/models.py:20 (reused at :707). Literal values match exactly; this is purely an export-surface gap. An open PR (#2083, "export OutcomeType alias") addresses the OutcomeType part.
Activity
realfishsam commentedon Oct 22, 2026
Additional context from duplicate #2075: the
OutcomeTypeunion is inlined twice inMarketFilterCriteriain TS (sdks/typescript/pmxt/models.ts:911and:918) vs.OutcomeType = Literal["yes","no","up","down"]atsdks/python/pmxt/models.py:20(reused at:707). Literal values match exactly; this is purely an export-surface gap. An open PR (#2083, "export OutcomeType alias") addresses theOutcomeTypepart.Generated by Claude Code