You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python's hosted-routing layer defines a HOSTED_UNSUPPORTED_METHODS set that explicitly marks fetch_closed_orders and fetch_all_orders as unsupported in hosted mode, raising NotSupported when they are called. TypeScript has no equivalent check: fetchClosedOrders and fetchAllOrders are callable in hosted mode without any guard, and either pass through to a missing endpoint or fail silently.
When a hosted client calls one of these methods, the routing layer raises NotSupported with a message indicating these methods are not available in hosted mode. Users get a clear, immediate error.
TypeScript
sdks/typescript/pmxt/hosted-routing.ts and sdks/typescript/pmxt/client.ts: No HOSTED_UNSUPPORTED_METHODS set exists. Neither fetchClosedOrders nor fetchAllOrders is guarded for hosted mode. A TypeScript hosted client can call them; the request either reaches an endpoint that does not exist or produces an unintelligible HTTP error from the hosted trading API.
Impact
Python hosted users receive a clean NotSupported error with a helpful message when they call fetch_closed_orders/fetch_all_orders.
TypeScript hosted users receive an opaque HTTP error (or timeout) from the trading API with no indication that the method is conceptually unsupported in hosted mode.
The disparity makes TypeScript hosted mode harder to use and debug than Python hosted mode.
HOSTED_METHOD_ROUTES in TypeScript (hosted-routing.ts) does not include fetchClosedOrders or fetchAllOrders, so calls do fall through to sidecar routing — but the sidecar is not running in hosted mode, so this also fails unexpectedly.
Summary
Python's hosted-routing layer defines a
HOSTED_UNSUPPORTED_METHODSset that explicitly marksfetch_closed_ordersandfetch_all_ordersas unsupported in hosted mode, raisingNotSupportedwhen they are called. TypeScript has no equivalent check:fetchClosedOrdersandfetchAllOrdersare callable in hosted mode without any guard, and either pass through to a missing endpoint or fail silently.Python
sdks/python/pmxt/_hosted_routing.py(~line 156):When a hosted client calls one of these methods, the routing layer raises
NotSupportedwith a message indicating these methods are not available in hosted mode. Users get a clear, immediate error.TypeScript
sdks/typescript/pmxt/hosted-routing.tsandsdks/typescript/pmxt/client.ts: NoHOSTED_UNSUPPORTED_METHODSset exists. NeitherfetchClosedOrdersnorfetchAllOrdersis guarded for hosted mode. A TypeScript hosted client can call them; the request either reaches an endpoint that does not exist or produces an unintelligible HTTP error from the hosted trading API.Impact
NotSupportederror with a helpful message when they callfetch_closed_orders/fetch_all_orders.HOSTED_METHOD_ROUTESin TypeScript (hosted-routing.ts) does not includefetchClosedOrdersorfetchAllOrders, so calls do fall through to sidecar routing — but the sidecar is not running in hosted mode, so this also fails unexpectedly.isHostedTradingMode()(venue allowlist); Python gates onself.is_hosted(any hosted URL) #1012.