Skip to content

Commit 3384cc6

Browse files
committed
release: 2.50.16 — fix fetch_open_orders missing hosted-mode routing branch
1 parent 072572a commit 3384cc6

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [2.50.16] - 2026-06-18
6+
7+
### Fixed
8+
9+
- **`sdks/python/pmxt/client.py` + `sdks/typescript/pmxt/client.ts``fetch_open_orders` / `fetchOpenOrders` missing hosted-mode routing branch.** Same class of bug as the 2.50.11-14 fixes for `fetch_balance` / `fetch_positions` / `fetch_order` / `fetch_my_trades` / `cancel_order`: hosted callers received `Trading operations require authentication. Initialize LimitlessExchange with credentials: ...` because the SDK fell through to the sidecar `/api/{exchange}/fetchOpenOrders` path instead of routing to the hosted `GET /v0/orders/open?address=...` endpoint. Added an `is_hosted` branch in both SDKs that resolves the wallet address, calls `_hosted_request("fetch_open_orders", params={"address": ...})`, and maps the response through `order_from_v0` / `orderFromV0`. The self-hosted/sidecar branch is preserved unchanged. Verified live against hosted Limitless: `fetch_open_orders()` returns `[]` cleanly and no longer raises.
10+
511
## [2.50.15] - 2026-06-18
612

713
### Fixed

sdks/python/pmxt/client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,6 +1540,16 @@ def fetch_order(self, order_id: str) -> Order:
15401540
raise self._parse_api_exception(e) from None
15411541

15421542
def fetch_open_orders(self, market_id: Optional[str] = None) -> List[Order]:
1543+
if self.is_hosted:
1544+
resolved_address = resolve_wallet_address(self, None)
1545+
params: Dict[str, Any] = {"address": resolved_address}
1546+
if market_id is not None:
1547+
params["market_id"] = market_id
1548+
response = self._hosted_request(
1549+
"fetch_open_orders",
1550+
params=params,
1551+
)
1552+
return self._hosted_collection(response, "orders", order_from_v0)
15431553
try:
15441554
args = []
15451555
if market_id is not None:

sdks/typescript/pmxt/client.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,18 @@ export abstract class Exchange {
12231223

12241224
async fetchOpenOrders(marketId?: string): Promise<Order[]> {
12251225
await this.initPromise;
1226+
if (this.isHosted) {
1227+
const resolvedAddress = resolveWalletAddress(this, undefined);
1228+
const route = HOSTED_METHOD_ROUTES.get("fetchOpenOrders")!;
1229+
const path = formatRoutePath(route, {});
1230+
const params: Record<string, string> = { address: resolvedAddress };
1231+
if (marketId !== undefined) params.market_id = marketId;
1232+
const data = await _tradingRequest(this, { method: route.method, path, params });
1233+
const list = Array.isArray(data)
1234+
? data
1235+
: (data && Array.isArray((data as any).orders) ? (data as any).orders : []);
1236+
return list.map((o: unknown) => orderFromV0(o as Record<string, unknown>));
1237+
}
12261238
try {
12271239
const args: any[] = [];
12281240
if (marketId !== undefined) args.push(marketId);

0 commit comments

Comments
 (0)