Skip to content

fix(sdk): expose venue filters in fetch params#1325

Merged
realfishsam merged 1 commit into
mainfrom
fix/issue-1317-1318-sdk-source-exchange
Jun 29, 2026
Merged

fix(sdk): expose venue filters in fetch params#1325
realfishsam merged 1 commit into
mainfrom
fix/issue-1317-1318-sdk-source-exchange

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Summary

  • Adds sourceExchange / exchange venue filter aliases to TypeScript market/event fetch parameter interfaces.
  • Adds matching source_exchange / exchange TypedDict keys to Python market/event fetch parameter types.

Fixes #1317
Fixes #1318

Test Plan

  • python3 -m py_compile sdks/python/pmxt/models.py
  • git diff --check

Note: TypeScript compiler validation was attempted, but this cron host could not install workspace dependencies because npm install failed with ENOSPC: no space left on device. The change is type-only and mirrors the already-present core BaseExchange fetch parameter fields.

@realfishsam

Copy link
Copy Markdown
Contributor Author

PR Review: PASS (NOT VERIFIED)

What This Does

Adds venue-filter aliases to SDK fetch parameter types: sourceExchange / exchange for TypeScript and source_exchange / exchange for Python. This improves SDK consumer type hints for filters the sidecar/core already accept at runtime.

Blast Radius

Type-only SDK surface in sdks/typescript/pmxt/models.ts and sdks/python/pmxt/models.py. No core exchange normalizers, OpenAPI schema, sidecar routes, generated clients, or SDK transport/conversion shims are changed.

Consumer Verification

Before (base branch):
The runtime clients already forward arbitrary params to the sidecar, but the typed SDK parameter models did not advertise venue filters. TypeScript MarketFilterParams / EventFetchParams and Python MarketFetchParams / EventFetchParams lacked these keys, so typed consumers could see static type errors when passing venue filters.

// before: no sourceExchange/exchange properties in MarketFilterParams/EventFetchParams
await client.fetchMarkets({ sourceExchange: 'polymarket' }); // runtime-forwardable, not typed

After (PR branch):
The TypeScript and Python type surfaces now include the aliases:

// sdks/typescript/pmxt/models.ts:453-457, 506-510
sourceExchange?: string;
exchange?: string;
# sdks/python/pmxt/models.py:749-750, 769-770
source_exchange: str
exchange: str

This is not directly observable through the HTTP consumer path because the PR only changes static type definitions; the existing SDK transport already serializes supplied params.

Test Results

  • Build: NOT VERIFIED (full TypeScript SDK compile is blocked in this checkout by missing generated artifacts: Cannot find module '../generated/src/index.js' from pmxt/client.ts and pmxt/server-manager.ts)
  • Unit tests: PASS for Python syntax (python3 -m py_compile sdks/python/pmxt/models.py)
  • Server starts: N/A (type-only SDK change)
  • E2E smoke: N/A (no runtime behavior changed)
  • Focused TypeScript type syntax: PASS (npx tsc --noEmit --skipLibCheck --moduleResolution node --target ES2020 --module commonjs sdks/typescript/pmxt/models.ts)

Findings

No blocking findings.

PMXT Pipeline Check

  • Field propagation (3-layer): N/A — no unified response fields added.
  • OpenAPI sync: N/A — no sidecar API shape changed.
  • Financial precision: N/A
  • Type safety: OK for the changed model file; full SDK compile was not verified because generated SDK artifacts are absent in this review environment.
  • Auth safety: N/A

Semver Impact

patch -- type-surface fix for existing/forwarded fetch params, with no runtime API break.

Risk

Generated SDK artifacts are unavailable in this checkout, so I could not run the full TypeScript SDK compile. Since the PR only widens parameter types, the remaining risk is limited to publication/type-generation parity rather than runtime behavior.

@realfishsam realfishsam merged commit ed1aabd into main Jun 29, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant