Skip to content

Commit b1fb0fa

Browse files
committed
fix(python): drop generated router exchange stub
1 parent 52f0769 commit b1fb0fa

3 files changed

Lines changed: 2 additions & 44 deletions

File tree

core/scripts/generate-python-exchanges.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function parseExchanges(content) {
105105
}
106106
if (currentName) exchanges.push(build(currentName, currentBlock));
107107

108-
return exchanges;
108+
return exchanges.filter(ex => ex.name !== 'router');
109109
}
110110

111111
function build(name, block) {

sdks/python/pmxt/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from .client import Exchange
2222
from .constants import ENV, ENV_BASE_URL, ENV_API_KEY
23-
from ._exchanges import Polymarket, Limitless, Kalshi, KalshiDemo, Probable, Baozi, Myriad, Opinion, Metaculus, Smarkets, PolymarketUS, Polymarket_us, Hyperliquid, GeminiTitan, SuiBets, Suibets, Mock, Router
23+
from ._exchanges import Polymarket, Limitless, Kalshi, KalshiDemo, Probable, Baozi, Myriad, Opinion, Metaculus, Smarkets, PolymarketUS, Polymarket_us, Hyperliquid, GeminiTitan, SuiBets, Suibets, Mock
2424
from .router import Router
2525
from .feed_client import FeedClient
2626
from .server_manager import ServerManager
@@ -185,7 +185,6 @@ def restart_server() -> None:
185185
"SuiBets",
186186
"Suibets",
187187
"Mock",
188-
"Router",
189188
"Exchange",
190189
"FeedClient",
191190
"ExchangeOptions",

sdks/python/pmxt/_exchanges.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ def __init__(
2121
base_url: Optional[str] = None,
2222
auto_start_server: Optional[bool] = None,
2323
pmxt_api_key: Optional[str] = None,
24-
# NOTE: Generated wrapper; update the generator template in
25-
# core/scripts/generate-python-exchanges.js in a follow-up.
26-
wallet_address: Optional[str] = None,
27-
signer: Optional[object] = None,
2824
) -> None:
2925
"""
3026
Initialize Polymarket client.
@@ -39,8 +35,6 @@ def __init__(
3935
base_url: Base URL of the PMXT sidecar server
4036
auto_start_server: Automatically start server if not running (default: True)
4137
pmxt_api_key: Hosted PMXT API key (optional; enables hosted mode)
42-
wallet_address: Ethereum address for hosted reads/writes (optional)
43-
signer: Optional callable for signing typed_data (optional)
4438
"""
4539
super().__init__(
4640
exchange_name="polymarket",
@@ -51,8 +45,6 @@ def __init__(
5145
base_url=base_url,
5246
auto_start_server=auto_start_server,
5347
pmxt_api_key=pmxt_api_key,
54-
wallet_address=wallet_address,
55-
signer=signer,
5648
)
5749

5850
self.api_secret = api_secret
@@ -296,10 +288,6 @@ def __init__(
296288
base_url: Optional[str] = None,
297289
auto_start_server: Optional[bool] = None,
298290
pmxt_api_key: Optional[str] = None,
299-
# NOTE: Generated wrapper; update the generator template in
300-
# core/scripts/generate-python-exchanges.js in a follow-up.
301-
wallet_address: Optional[str] = None,
302-
signer: Optional[object] = None,
303291
) -> None:
304292
"""
305293
Initialize Opinion client.
@@ -311,8 +299,6 @@ def __init__(
311299
base_url: Base URL of the PMXT sidecar server
312300
auto_start_server: Automatically start server if not running (default: True)
313301
pmxt_api_key: Hosted PMXT API key (optional; enables hosted mode)
314-
wallet_address: Ethereum address for hosted reads/writes (optional)
315-
signer: Optional callable for signing typed_data (optional)
316302
"""
317303
super().__init__(
318304
exchange_name="opinion",
@@ -322,8 +308,6 @@ def __init__(
322308
base_url=base_url,
323309
auto_start_server=auto_start_server,
324310
pmxt_api_key=pmxt_api_key,
325-
wallet_address=wallet_address,
326-
signer=signer,
327311
)
328312

329313

@@ -535,31 +519,6 @@ def __init__(
535519
pmxt_api_key=pmxt_api_key,
536520
)
537521

538-
539-
class Router(Exchange):
540-
"""Router exchange client."""
541-
542-
def __init__(
543-
self,
544-
base_url: Optional[str] = None,
545-
auto_start_server: Optional[bool] = None,
546-
pmxt_api_key: Optional[str] = None,
547-
) -> None:
548-
"""
549-
Initialize Router client.
550-
551-
Args:
552-
base_url: Base URL of the PMXT sidecar server
553-
auto_start_server: Automatically start server if not running (default: True)
554-
pmxt_api_key: Hosted PMXT API key (optional; enables hosted mode)
555-
"""
556-
super().__init__(
557-
exchange_name="router",
558-
base_url=base_url,
559-
auto_start_server=auto_start_server,
560-
pmxt_api_key=pmxt_api_key,
561-
)
562-
563522
# Backwards-compatible aliases for exchange classes generated before underscore handling.
564523
Polymarket_us = PolymarketUS
565524
Suibets = SuiBets

0 commit comments

Comments
 (0)