Drift
TypeScript exports a SubscriptionOption union type constraining watch_address subscription categories to 'trades' | 'positions' | 'balances'. Python has no equivalent type and watch_address accepts a plain list[str], providing no type-safety or documentation of valid values.
TypeScript SDK
sdks/typescript/pmxt/models.ts, line 768:
// sdks/typescript/pmxt/models.ts line 768
export type SubscriptionOption = 'trades' | 'positions' | 'balances';
sdks/typescript/pmxt/client.ts, line 1728:
// sdks/typescript/pmxt/client.ts line 1728
async watchAddress(
address: string,
types?: SubscriptionOption[]
): Promise<SubscribedAddressSnapshot>
SubscriptionOption is also exported from sdks/typescript/index.ts via export type * from "./pmxt/models.js".
Python SDK
sdks/python/pmxt/client.py, line 2033 — untyped list[str]:
# sdks/python/pmxt/client.py line 2033
async def watch_address(
self,
address: str,
types: list[str] = None,
) -> SubscribedAddressSnapshot:
No SubscriptionOption literal type exists anywhere in sdks/python/pmxt/models.py or sdks/python/pmxt/__init__.py.
Expected
Python should define a SubscriptionOption Literal type (or TypeAlias) equivalent to TypeScript's union:
SubscriptionOption = Literal['trades', 'positions', 'balances']
watch_address should use Optional[list[SubscriptionOption]] and SubscriptionOption should be exported from __init__.py and included in __all__.
Impact
Python callers can pass any string as a subscription type (e.g., "trade" instead of "trades") and receive no static or runtime error until the sidecar rejects the request. TypeScript callers get a compile-time error for the same mistake. Discoverability of valid values is also lost in Python.
Found by automated SDK cross-language drift audit
Drift
TypeScript exports a
SubscriptionOptionunion type constrainingwatch_addresssubscription categories to'trades' | 'positions' | 'balances'. Python has no equivalent type andwatch_addressaccepts a plainlist[str], providing no type-safety or documentation of valid values.TypeScript SDK
sdks/typescript/pmxt/models.ts, line 768:sdks/typescript/pmxt/client.ts, line 1728:SubscriptionOptionis also exported fromsdks/typescript/index.tsviaexport type * from "./pmxt/models.js".Python SDK
sdks/python/pmxt/client.py, line 2033 — untypedlist[str]:No
SubscriptionOptionliteral type exists anywhere insdks/python/pmxt/models.pyorsdks/python/pmxt/__init__.py.Expected
Python should define a
SubscriptionOptionLiteraltype (orTypeAlias) equivalent to TypeScript's union:watch_addressshould useOptional[list[SubscriptionOption]]andSubscriptionOptionshould be exported from__init__.pyand included in__all__.Impact
Python callers can pass any string as a subscription type (e.g.,
"trade"instead of"trades") and receive no static or runtime error until the sidecar rejects the request. TypeScript callers get a compile-time error for the same mistake. Discoverability of valid values is also lost in Python.Found by automated SDK cross-language drift audit