pmxt icon indicating copy to clipboard operation
pmxt copied to clipboard

SDK drift: Python `ExchangeOptions` TypedDict missing `wallet_address` and `signer` fields present in TypeScript

Open realfishsam opened this issue 5 months ago • 0 comments

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_address and signer are present at the Python constructor level for Polymarket and Opinion (in _exchanges.py), but they are not captured in the shared ExchangeOptions TypedDict, making the typing incomplete and inconsistent.
  • Code that type-annotates exchange options with ExchangeOptions cannot include wallet_address or signer without a cast.
  • The venue-specific gap for Limitless is tracked separately in #993, but the root cause is the missing fields in the shared ExchangeOptions TypedDict.

realfishsam avatar Jun 16 '26 15:06 realfishsam