Skip to content

SDK drift: Python base Exchange.__init__ accepts api_token parameter absent from TypeScript ExchangeOptions #1420

Closed as duplicate

Description

@realfishsam

Summary

Python's base Exchange.__init__ at sdks/python/pmxt/client.py:329 accepts an api_token: Optional[str] keyword argument. TypeScript's ExchangeOptions interface at sdks/typescript/pmxt/client.ts (around line 232–287) has no apiToken field.

The parameter is used by Metaculus — sdks/python/pmxt/_exchanges.py:341 passes api_token=api_token to super().__init__(). TypeScript Metaculus users have no typed way to pass this credential.

File locations

SDK File Detail
Python sdks/python/pmxt/client.py:329 Exchange.__init__ signature includes api_token: Optional[str]
Python sdks/python/pmxt/_exchanges.py:341 Metaculus.__init__ forwards api_token=api_token to base
TypeScript sdks/typescript/pmxt/client.ts ExchangeOptions interface has no apiToken field

Impact

TypeScript Metaculus instances cannot provide an API token via the typed constructor interface. Any code migrating from Python to TypeScript will silently drop this credential.

Activity

  1. added
    sdk-driftCross-language SDK consistency findings (TypeScript vs Python)
    on Jun 30, 2026
  2. realfishsam commented on Jun 30, 2026

    @realfishsam
    ContributorAuthor

    Closing as duplicate of #469. Same underlying finding (Python Exchange.__init__ has api_token, no TypeScript equivalent, affects Metaculus). Updated line references have been copied over to #469.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdk-driftCross-language SDK consistency findings (TypeScript vs Python)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions