Drift
Python's generated _exchanges.py includes a Router class stamped out by the same generic exchange-wrapper generator used for ordinary exchanges. This class is missing all of Router's real functionality and is immediately shadowed by the real Router class from router.py on package import — but it remains reachable via pmxt._exchanges.Router, is dead code from the public API's perspective, and disagrees with the real Router on its own auto_start_server default. TypeScript has no equivalent duplication: it defines exactly one Router class, in router.ts.
TypeScript SDK
No Router class exists in client.ts (the file structurally analogous to _exchanges.py). TypeScript's only Router class is in sdks/typescript/pmxt/router.ts:218-221, taking a RouterOptions object with autoStartServer defaulting to false.
Python SDK
Dead/shadowed duplicate: sdks/python/pmxt/_exchanges.py:601-623
class Router(Exchange):
"""Router exchange client."""
def __init__(
self,
base_url: Optional[str] = None,
auto_start_server: Optional[bool] = None,
pmxt_api_key: Optional[str] = None,
) -> None:
super().__init__(
exchange_name="router",
base_url=base_url,
auto_start_server=auto_start_server,
pmxt_api_key=pmxt_api_key,
)
This has none of Router's real methods (fetch_market_matches, compare_market_prices, fetch_hedges, fetch_arbitrage, etc.) and defaults auto_start_server to None.
Real, actually-used class: sdks/python/pmxt/router.py:106-141
class Router(Exchange):
def __init__(
self,
pmxt_api_key: Optional[str] = None,
base_url: Optional[str] = None,
auto_start_server: bool = False,
) -> None:
...
auto_start_server defaults to False, and it has full Router functionality.
Shadowing point: sdks/python/pmxt/__init__.py:23-24
from ._exchanges import Polymarket, ..., Rain, Hunch, Mock, Router
from .router import Router
Line 24 immediately overwrites the name imported on line 23, so pmxt.Router always resolves to router.py's version in normal usage.
Expected
core/scripts/generate-python-exchanges.js should exclude router from the set of venues it generates a generic wrapper for in _exchanges.py, the same way both SDKs already hand-maintain a single, feature-complete Router class elsewhere (router.ts / router.py).
Impact
Low runtime impact for normal import pmxt; pmxt.Router(...) usage since the real class wins, but: (1) it's a landmine for anyone importing from pmxt._exchanges import Router directly, or introspecting pmxt._exchanges.__all__/module contents, who will silently get a non-functional stub instead of a real Router; (2) the two Python definitions of "the same class" don't even agree with each other on the auto_start_server default (None vs False), which is confusing for maintainers and a source of future bugs if the generator or router.py changes independently; (3) it's dead code that should either be excluded from generation or removed.
Found by automated SDK cross-language drift audit
Drift
Python's generated
_exchanges.pyincludes aRouterclass stamped out by the same generic exchange-wrapper generator used for ordinary exchanges. This class is missing all of Router's real functionality and is immediately shadowed by the realRouterclass fromrouter.pyon package import — but it remains reachable viapmxt._exchanges.Router, is dead code from the public API's perspective, and disagrees with the realRouteron its ownauto_start_serverdefault. TypeScript has no equivalent duplication: it defines exactly oneRouterclass, inrouter.ts.TypeScript SDK
No
Routerclass exists inclient.ts(the file structurally analogous to_exchanges.py). TypeScript's onlyRouterclass is insdks/typescript/pmxt/router.ts:218-221, taking aRouterOptionsobject withautoStartServerdefaulting tofalse.Python SDK
Dead/shadowed duplicate:
sdks/python/pmxt/_exchanges.py:601-623This has none of Router's real methods (
fetch_market_matches,compare_market_prices,fetch_hedges,fetch_arbitrage, etc.) and defaultsauto_start_servertoNone.Real, actually-used class:
sdks/python/pmxt/router.py:106-141auto_start_serverdefaults toFalse, and it has full Router functionality.Shadowing point:
sdks/python/pmxt/__init__.py:23-24Line 24 immediately overwrites the name imported on line 23, so
pmxt.Routeralways resolves torouter.py's version in normal usage.Expected
core/scripts/generate-python-exchanges.jsshould excluderouterfrom the set of venues it generates a generic wrapper for in_exchanges.py, the same way both SDKs already hand-maintain a single, feature-completeRouterclass elsewhere (router.ts/router.py).Impact
Low runtime impact for normal
import pmxt; pmxt.Router(...)usage since the real class wins, but: (1) it's a landmine for anyone importingfrom pmxt._exchanges import Routerdirectly, or introspectingpmxt._exchanges.__all__/module contents, who will silently get a non-functional stub instead of a real Router; (2) the two Python definitions of "the same class" don't even agree with each other on theauto_start_serverdefault (NonevsFalse), which is confusing for maintainers and a source of future bugs if the generator orrouter.pychanges independently; (3) it's dead code that should either be excluded from generation or removed.Found by automated SDK cross-language drift audit