What
The condition that controls access to the hosted trading path differs across SDKs.
TypeScript (sdks/typescript/pmxt/client.ts):
createOrder, buildOrder, cancelOrder, fetchClosedOrders, fetchAllOrders check this.isHostedTradingMode().
isHostedTradingMode() returns true only when BOTH pmxtApiKey is set AND this.exchangeName is in HOSTED_TRADING_VENUES = new Set(["polymarket", "opinion"]) (sdks/typescript/pmxt/hosted-routing.ts).
- For any other hosted venue (e.g. Kalshi with
pmxtApiKey), TypeScript throws: "Trade execution is not available through the hosted API".
Python (sdks/python/pmxt/client.py:3003, 3159, 3262):
create_order, build_order, submit_order check self.is_hosted — True for ANY client constructed with pmxt_api_key, regardless of venue name.
- There is no venue-allowlist guard; all venues enter the hosted trading code path.
Impact
A Python Kalshi(pmxt_api_key=...) client will attempt to route create_order through the hosted trading API. The equivalent TypeScript Kalshi(pmxtApiKey: ...) client will throw an explicit "not available" error before making any request. The Python path silently enters a code path that is likely to fail at the server level with a cryptic error.
What
The condition that controls access to the hosted trading path differs across SDKs.
TypeScript (
sdks/typescript/pmxt/client.ts):createOrder,buildOrder,cancelOrder,fetchClosedOrders,fetchAllOrderscheckthis.isHostedTradingMode().isHostedTradingMode()returnstrueonly when BOTHpmxtApiKeyis set ANDthis.exchangeNameis inHOSTED_TRADING_VENUES = new Set(["polymarket", "opinion"])(sdks/typescript/pmxt/hosted-routing.ts).pmxtApiKey), TypeScript throws:"Trade execution is not available through the hosted API".Python (
sdks/python/pmxt/client.py:3003, 3159, 3262):create_order,build_order,submit_ordercheckself.is_hosted—Truefor ANY client constructed withpmxt_api_key, regardless of venue name.Impact
A Python
Kalshi(pmxt_api_key=...)client will attempt to routecreate_orderthrough the hosted trading API. The equivalent TypeScriptKalshi(pmxtApiKey: ...)client will throw an explicit "not available" error before making any request. The Python path silently enters a code path that is likely to fail at the server level with a cryptic error.