Skip to content

sdk-drift: PolymarketOptions interface exported from TypeScript, no equivalent exported from Python #849

@realfishsam

Description

@realfishsam

Drift

TypeScript exports a named PolymarketOptions interface (extending ExchangeOptions) that documents all Polymarket-specific constructor options. Python has no corresponding exported options type for Polymarket.

TypeScript SDK

sdks/typescript/pmxt/client.ts, lines 2527–2548:

export interface PolymarketOptions extends ExchangeOptions {
  signatureType?: 'eoa' | 'poly-proxy' | 'gnosis-safe' | number;
  apiKey?: string;
  privateKey?: string;
  proxyAddress?: string;
  pmxtApiKey?: string;
  baseUrl?: string;
  autoStartServer?: boolean;
}

PolymarketOptions is re-exported from the package root.

Python SDK

sdks/python/pmxt/_exchanges.py, line 10: Polymarket.__init__ accepts equivalent flat keyword arguments but no PolymarketOptions TypedDict is defined.

sdks/python/pmxt/__init__.py: PolymarketOptions is not exported.

Expected

Python should export a PolymarketOptions TypedDict (extending or incorporating ExchangeOptions):

class PolymarketOptions(TypedDict, total=False):
    signature_type: Union[Literal['eoa', 'poly-proxy', 'gnosis-safe'], int]
    api_key: str
    api_secret: str
    passphrase: str
    private_key: str
    proxy_address: str
    pmxt_api_key: str
    base_url: str
    auto_start_server: bool

and re-export it from pmxt/__init__.py.

Impact

Python callers who want to store or pass Polymarket config as a typed dict cannot do so against a public API type. This is the most commonly used exchange, so the missing options type has a high discoverability cost.


Found by automated SDK cross-language drift audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions