Skip to content

TypeScript exports MyTradesParams typed interface; Python fetch_my_trades takes untyped Optional[dict] #736

@realfishsam

Description

@realfishsam

Drift

TypeScript exports a named MyTradesParams interface documenting all filter parameters for fetchMyTrades. Python's fetch_my_trades accepts an untyped Optional[dict] with no equivalent typed structure defined or exported.

TypeScript SDK

sdks/typescript/pmxt/models.ts:551-564

export interface MyTradesParams {
    outcomeId?: string;
    marketId?: string;
    since?: number;
    until?: number;
    limit?: number;
    cursor?: string;
}

Exported from sdks/typescript/index.ts.

Python SDK

sdks/python/pmxt/client.pyfetch_my_trades signature:

async def fetch_my_trades(
    self,
    symbol: Optional[str] = None,
    since: Optional[int] = None,
    limit: Optional[int] = None,
    params: Optional[dict] = None,
) -> List[UserTrade]:

No MyTradesParams TypedDict is defined in sdks/python/pmxt/models.py or exported from sdks/python/pmxt/__init__.py. The fields outcome_id, market_id, until, and cursor are not surfaced as typed parameters at all.

Expected

A MyTradesParams TypedDict should be defined in sdks/python/pmxt/models.py and exported, with snake_case equivalents of all TypeScript fields (outcome_id, market_id, since, until, limit, cursor).

Impact

Python users cannot discover or type-check the full set of filter options for fetch_my_trades; fields like outcome_id, until, and cursor are effectively hidden.

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