Skip to main content
Glama

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
NameRequiredDescriptionDefault
exchangeYesExchange name: pacifica, hyperliquid, or lighter

Implementation Reference

  • 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 };
        }
      },
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hypurrquant/perp-cli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server