Skip to content

SDK drift: Python UnifiedMarket has a question property alias for title; TypeScript does not #695

Description

@realfishsam

Drift

Python's UnifiedMarket dataclass exposes a question property that is a simple alias for title. TypeScript's UnifiedMarket interface has no question field or accessor.

TypeScript SDK

sdks/typescript/pmxt/models.ts, lines 37–106:

export interface UnifiedMarket {
    marketId: string;
    title: string;
    // ... no `question` field
}

Python SDK

sdks/python/pmxt/models.py, lines 56–132:

@dataclass
class UnifiedMarket:
    market_id: str
    title: str
    # ...

    @property
    def question(self) -> str:
        """Alias for title."""
        return self.title

(lines 128–131)

Expected

Both SDKs should offer the same public surface. Either:

  • Add question as a computed property / getter to the TypeScript UnifiedMarket interface and implement it as get question() { return this.title; }, or
  • Remove question from the Python dataclass and document title as the canonical field.

The docs should clarify which is preferred. If question exists for discoverability in LLM / forecasting contexts where markets are often described as questions, it should be added to TypeScript too.

Impact

Python code accessing market.question cannot be directly translated to TypeScript — the equivalent TS code would require market.title. This silently breaks cross-language portability of user code. Type checkers on the TypeScript side produce no warnings since the property simply doesn't exist.


Found by automated SDK cross-language drift audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    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