pmxt
pmxt copied to clipboard
SDK drift: Python `ExchangeOptions` TypedDict missing `wallet_address` and `signer` fields present in TypeScript
Summary
TypeScript ExchangeOptions defines walletAddress and signer as constructor options on the base Exchange class, making them uniformly available across all venue clients. The Python ExchangeOptions TypedDict in models.py has neither wallet_address nor signer, so no venue client can be typed as accepting these options via the shared options type.
TypeScript
File: sdks/typescript/pmxt/client.ts:281–288
export interface ExchangeOptions {
// ... (apiKey, privateKey, pmxtApiKey, baseUrl, autoStartServer, proxyAddress, signatureType)
/**
* EVM wallet address used for hosted reads/writes.
*/
walletAddress?: string;
/**
* External signer used for hosted writes.
*/
signer?: Signer;
}
Python
File: sdks/python/pmxt/models.py:641–650
class ExchangeOptions(TypedDict, total=False):
"""Constructor options shared by the exchange clients."""
pmxt_api_key: str
base_url: str
auto_start_server: bool
api_key: str
private_key: str
api_token: str
proxy_address: str
signature_type: Union[str, int]
# wallet_address and signer are ABSENT
Impact
wallet_addressandsignerare present at the Python constructor level for Polymarket and Opinion (in_exchanges.py), but they are not captured in the sharedExchangeOptionsTypedDict, making the typing incomplete and inconsistent.- Code that type-annotates exchange options with
ExchangeOptionscannot includewallet_addressorsignerwithout a cast. - The venue-specific gap for Limitless is tracked separately in #993, but the root cause is the missing fields in the shared
ExchangeOptionsTypedDict.