get_open_orders
Retrieve all open and pending orders on specified perpetual futures exchanges to monitor active trading positions and manage risk.
Instructions
Get all open/pending orders on an exchange
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exchange | Yes | Exchange name: pacifica, hyperliquid, or lighter |
Implementation Reference
- src/mcp-server.ts:234-246 (handler)The "get_open_orders" MCP tool implementation. It uses a factory function `getOrCreateAdapter` to get the exchange adapter and then calls the `getOpenOrders()` method on it.
"get_open_orders", "Get all open/pending orders on an exchange", { exchange: z.string().describe("Exchange name: pacifica, hyperliquid, or lighter") }, async ({ exchange }) => { try { const adapter = await getOrCreateAdapter(exchange); const orders = await adapter.getOpenOrders(); return { content: [{ type: "text", text: ok(orders, { exchange, count: orders.length }) }] }; } catch (e) { return { content: [{ type: "text", text: err(e instanceof Error ? e.message : String(e), { exchange }) }], isError: true }; } }, );