Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/scripts/generate-python-exchanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function parseExchanges(content) {
}
if (currentName) exchanges.push(build(currentName, currentBlock));

return exchanges;
return exchanges.filter(ex => ex.name !== 'router');
}

function build(name, block) {
Expand Down
3 changes: 1 addition & 2 deletions sdks/python/pmxt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from .client import Exchange
from .constants import ENV, ENV_BASE_URL, ENV_API_KEY
from ._exchanges import Polymarket, Limitless, Kalshi, KalshiDemo, Probable, Baozi, Myriad, Opinion, Metaculus, Smarkets, PolymarketUS, Polymarket_us, Hyperliquid, GeminiTitan, SuiBets, Suibets, Mock, Router
from ._exchanges import Polymarket, Limitless, Kalshi, KalshiDemo, Probable, Baozi, Myriad, Opinion, Metaculus, Smarkets, PolymarketUS, Polymarket_us, Hyperliquid, GeminiTitan, SuiBets, Suibets, Mock
from .router import Router
from .feed_client import FeedClient
from .server_manager import ServerManager
Expand Down Expand Up @@ -185,7 +185,6 @@ def restart_server() -> None:
"SuiBets",
"Suibets",
"Mock",
"Router",
"Exchange",
"FeedClient",
"ExchangeOptions",
Expand Down
41 changes: 0 additions & 41 deletions sdks/python/pmxt/_exchanges.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ def __init__(
base_url: Optional[str] = None,
auto_start_server: Optional[bool] = None,
pmxt_api_key: Optional[str] = None,
# NOTE: Generated wrapper; update the generator template in
# core/scripts/generate-python-exchanges.js in a follow-up.
wallet_address: Optional[str] = None,
signer: Optional[object] = None,
) -> None:
"""
Initialize Polymarket client.
Expand All @@ -39,8 +35,6 @@ def __init__(
base_url: Base URL of the PMXT sidecar server
auto_start_server: Automatically start server if not running (default: True)
pmxt_api_key: Hosted PMXT API key (optional; enables hosted mode)
wallet_address: Ethereum address for hosted reads/writes (optional)
signer: Optional callable for signing typed_data (optional)
"""
super().__init__(
exchange_name="polymarket",
Expand All @@ -51,8 +45,6 @@ def __init__(
base_url=base_url,
auto_start_server=auto_start_server,
pmxt_api_key=pmxt_api_key,
wallet_address=wallet_address,
signer=signer,
)

self.api_secret = api_secret
Expand Down Expand Up @@ -296,10 +288,6 @@ def __init__(
base_url: Optional[str] = None,
auto_start_server: Optional[bool] = None,
pmxt_api_key: Optional[str] = None,
# NOTE: Generated wrapper; update the generator template in
# core/scripts/generate-python-exchanges.js in a follow-up.
wallet_address: Optional[str] = None,
signer: Optional[object] = None,
) -> None:
"""
Initialize Opinion client.
Expand All @@ -311,8 +299,6 @@ def __init__(
base_url: Base URL of the PMXT sidecar server
auto_start_server: Automatically start server if not running (default: True)
pmxt_api_key: Hosted PMXT API key (optional; enables hosted mode)
wallet_address: Ethereum address for hosted reads/writes (optional)
signer: Optional callable for signing typed_data (optional)
"""
super().__init__(
exchange_name="opinion",
Expand All @@ -322,8 +308,6 @@ def __init__(
base_url=base_url,
auto_start_server=auto_start_server,
pmxt_api_key=pmxt_api_key,
wallet_address=wallet_address,
signer=signer,
)


Expand Down Expand Up @@ -535,31 +519,6 @@ def __init__(
pmxt_api_key=pmxt_api_key,
)


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:
"""
Initialize Router client.

Args:
base_url: Base URL of the PMXT sidecar server
auto_start_server: Automatically start server if not running (default: True)
pmxt_api_key: Hosted PMXT API key (optional; enables hosted mode)
"""
super().__init__(
exchange_name="router",
base_url=base_url,
auto_start_server=auto_start_server,
pmxt_api_key=pmxt_api_key,
)

# Backwards-compatible aliases for exchange classes generated before underscore handling.
Polymarket_us = PolymarketUS
Suibets = SuiBets
Loading