Drift
TypeScript's fetchOHLCV/fetchTrades declare params with no default and no ? marker, and immediately dereference it (params.resolution). Calling either method with only the outcome id throws a native TypeError, re-wrapped as a PmxtError. Python's equivalents accept the outcome id alone and work fine, since every other parameter is independently optional with a None default. This is distinct from already-filed #1383/#1425 (which are about the opaque params: any typing style vs. named kwargs) — this issue is about the default-value/optionality gap that causes a runtime crash.
TypeScript SDK
sdks/typescript/pmxt/client.ts:1844-1847 (fetchOHLCV) and :1882-1885 (fetchTrades):
async fetchOHLCV(
outcomeId: string | MarketOutcome,
params: any
): Promise<PriceCandle[]> {
async fetchTrades(
outcomeId: string | MarketOutcome,
params: any
): Promise<Trade[]> {
client.ts:1851 immediately does const paramsDict: any = { resolution: params.resolution }; — if params is undefined this throws, caught and re-wrapped as PmxtError at client.ts:1868-1869.
Python SDK
sdks/python/pmxt/client.py:2224-2232 (fetch_ohlcv) and :2287-2296 (fetch_trades) — resolution, limit, since, start, end are all independently optional with None defaults; fetch_ohlcv(outcome_id) and fetch_trades(outcome_id) work with zero extra arguments.
Expected
TypeScript's fetchOHLCV/fetchTrades should accept an omitted/undefined params argument without crashing, matching Python's ability to call with only the outcome id.
Impact
Any TypeScript caller doing exchange.fetchOHLCV(outcomeId) or exchange.fetchTrades(outcomeId) gets PmxtError: Failed to fetch OHLCV: TypeError: Cannot read properties of undefined (reading 'resolution') instead of a working call, unlike the equivalent Python call.
Found by automated SDK cross-language drift audit
Drift
TypeScript's
fetchOHLCV/fetchTradesdeclareparamswith no default and no?marker, and immediately dereference it (params.resolution). Calling either method with only the outcome id throws a nativeTypeError, re-wrapped as aPmxtError. Python's equivalents accept the outcome id alone and work fine, since every other parameter is independently optional with aNonedefault. This is distinct from already-filed #1383/#1425 (which are about the opaqueparams: anytyping style vs. named kwargs) — this issue is about the default-value/optionality gap that causes a runtime crash.TypeScript SDK
sdks/typescript/pmxt/client.ts:1844-1847(fetchOHLCV) and:1882-1885(fetchTrades):client.ts:1851immediately doesconst paramsDict: any = { resolution: params.resolution };— ifparamsisundefinedthis throws, caught and re-wrapped asPmxtErroratclient.ts:1868-1869.Python SDK
sdks/python/pmxt/client.py:2224-2232(fetch_ohlcv) and:2287-2296(fetch_trades) —resolution,limit,since,start,endare all independently optional withNonedefaults;fetch_ohlcv(outcome_id)andfetch_trades(outcome_id)work with zero extra arguments.Expected
TypeScript's
fetchOHLCV/fetchTradesshould accept an omitted/undefinedparamsargument without crashing, matching Python's ability to call with only the outcome id.Impact
Any TypeScript caller doing
exchange.fetchOHLCV(outcomeId)orexchange.fetchTrades(outcomeId)getsPmxtError: Failed to fetch OHLCV: TypeError: Cannot read properties of undefined (reading 'resolution')instead of a working call, unlike the equivalent Python call.Found by automated SDK cross-language drift audit