Skip to main content
Glama

jupiter_limit_orders

Retrieve all open limit orders for a wallet, including pending trigger orders with price targets and amounts.

Instructions

Get all open limit orders for a wallet — pending trigger orders with price targets and amounts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesWallet address

Implementation Reference

  • The tool handler for 'jupiter_limit_orders' — registers the tool with Zod schema (wallet string), calls client.triggerOrders(args.wallet) and returns JSON result.
    export function registerTriggerTools(register: ToolRegistrar, client: JupiterClient) {
      register(
        "jupiter_limit_orders",
        "Get all open limit orders for a wallet — pending trigger orders with price targets and amounts.",
        {
          wallet: z.string().describe("Wallet address"),
        },
        async (args) => {
          const result = await client.triggerOrders(args.wallet);
          return JSON.stringify(result, null, 2);
        },
      );
  • The JupiterClient methods backing limit order tools: triggerOrders (GET /trigger/v2/orders), triggerCreate (POST /trigger/v2/orders/price), triggerCancel (POST /trigger/v2/orders/cancel).
    // ── Trigger (Limit Orders) ───────────────────────────────
    
    /** Get open limit orders for a wallet */
    async triggerOrders(wallet: string) {
      return this.request("/trigger/v2/orders", {
        params: { wallet },
      });
    }
    
    /** Create a limit order (returns transaction to sign) */
    async triggerCreate(params: {
      inputMint: string;
      outputMint: string;
      inAmount: string;
      outAmount: string;
      maker: string;
      expiredAt?: string;
    }) {
      return this.request("/trigger/v2/orders/price", {
        method: "POST",
        body: params,
      });
    }
    
    /** Cancel a limit order */
    async triggerCancel(params: { maker: string; orders: string[] }) {
      return this.request("/trigger/v2/orders/cancel", {
        method: "POST",
        body: params,
      });
    }
  • All three trigger/limit-order tools registered in registerTriggerTools: jupiter_limit_orders, jupiter_limit_order_create, jupiter_limit_order_cancel.
    import { z } from "zod";
    import { JupiterClient } from "../client.js";
    import type { ToolRegistrar } from "../types.js";
    
    export function registerTriggerTools(register: ToolRegistrar, client: JupiterClient) {
      register(
        "jupiter_limit_orders",
        "Get all open limit orders for a wallet — pending trigger orders with price targets and amounts.",
        {
          wallet: z.string().describe("Wallet address"),
        },
        async (args) => {
          const result = await client.triggerOrders(args.wallet);
          return JSON.stringify(result, null, 2);
        },
      );
    
      register(
        "jupiter_limit_order_create",
        "Create a limit order. Returns a transaction to sign. Supports single, OCO (TP/SL), and OTOCO orders.",
        {
          inputMint: z.string().describe("Mint of token to sell"),
          outputMint: z.string().describe("Mint of token to buy"),
          inAmount: z.string().describe("Amount to sell in base units"),
          outAmount: z.string().describe("Min amount to receive (sets limit price)"),
          maker: z.string().describe("Wallet address creating the order"),
          expiredAt: z.string().optional().describe("ISO 8601 expiration time"),
        },
        async (args) => {
          const result = await client.triggerCreate(args);
          return JSON.stringify(result, null, 2);
        },
      );
    
      register(
        "jupiter_limit_order_cancel",
        "Cancel one or more open limit orders.",
        {
          maker: z.string().describe("Wallet that created the orders"),
          orders: z.array(z.string()).describe("Order public keys to cancel"),
        },
        async (args) => {
          const result = await client.triggerCancel(args);
          return JSON.stringify(result, null, 2);
        },
      );
    }
  • src/index.ts:40-58 (registration)
    The central register() function that wraps server.tool() with error handling — called for all tool registrations including jupiter_limit_orders.
    function register(
      name: string,
      description: string,
      shape: Record<string, z.ZodType>,
      handler: (args: any) => Promise<string>,
    ) {
      server.tool(name, description, shape, async (args) => {
        try {
          const text = await handler(args);
          return { content: [{ type: "text" as const, text }] };
        } catch (err: any) {
          return {
            content: [{ type: "text" as const, text: `Error: ${err.message}` }],
            isError: true,
          };
        }
      });
      toolCount++;
    }
  • src/index.ts:65-65 (registration)
    Invocation of registerTriggerTools(register, client) which registers jupiter_limit_orders and its sibling tools.
    registerTriggerTools(register, client);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and the description only states the purpose without disclosing behavioral traits like pagination, rate limits, or prerequisites.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with a dash adding detail, no wasted words, front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a simple tool, but lacks return value description (no output schema) and usage context beyond the core function.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers the single parameter 'wallet' with description; the tool description adds no extra meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get', the resource 'open limit orders', and the scope 'for a wallet', distinguishing it from sibling create/cancel tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implicitly suggests usage for viewing open orders, but no explicit when-to-use or when-not-to-use guidance, nor alternatives are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/ExpertVagabond/jupiter-mcp'

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