Skip to main content
Glama

create_limit_order

Create a limit order on Solana that triggers when a target price is reached. Returns an unsigned transaction to sign and execute.

Instructions

Create a limit order that executes when target price is reached.

This function is FREE to call and does not execute any transactions. It returns an unsigned transaction that must be signed and executed.

⚠️ IMPORTANT WARNINGS:

  1. MINIMUM ORDER SIZE: Jupiter frontend enforces $5 USD minimum to ensure keeper profitability. Programmatically, smaller orders are accepted but may never execute!

  2. PRICE VALIDATION: The program does NOT check if your price makes sense!

    • Buying above market price? Order executes immediately at a LOSS

    • Setting wrong rate (e.g., 1000 USDC for 1 SOL)? You LOSE the difference!

    • Jupiter frontend warns/blocks orders >5% above market - API does NOT!

  3. TRANSFER TAX: Tokens with transfer tax extensions are disabled on frontend but API will accept them - be careful!

  4. SLIPPAGE: By default, trigger orders execute with 0 slippage (exact price). Add slippage for better fill probability but at worse price.

Args: input_mint: Input token mint address (token to sell) output_mint: Output token mint address (token to buy) making_amount: Amount of input token to sell in smallest unit taking_amount: Amount of output token to receive in smallest unit (sets the price) slippage_bps: Slippage in basis points (0 = exact price, >0 = accept worse price) expired_at: Unix timestamp when order expires (optional)

Returns: Dictionary containing: - success: Boolean indicating if the request was successful - data: Contains 'order' (account address), 'transaction' (unsigned), and 'requestId' - error: Error message if request failed

Note: - Uses configured wallet as maker/payer - Includes automatic referral (2.55%) - Order executes when market price reaches your target

Example: >>> # SAFE: Create limit order to sell 0.1 SOL when price reaches $200 >>> # Current market: 1 SOL = $180, so this waits for price to rise >>> result = await api.create_limit_order( ... input_mint="So11111111111111111111111111111111111111112", # SOL ... output_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", # USDC ... making_amount="100000000", # 0.1 SOL (9 decimals) ... taking_amount="20000000", # 20 USDC (6 decimals) = $200/SOL rate ... slippage_bps=50 # 0.5% slippage for better fills ... ) >>> >>> # DANGEROUS: Wrong price - selling 1 SOL for only 1 USDC! >>> # This executes immediately and you LOSE ~$179! >>> # DON'T DO THIS: >>> # result = await api.create_limit_order( >>> # input_mint="So11...112", >>> # output_mint="EPj...t1v", >>> # making_amount="1000000000", # 1 SOL >>> # taking_amount="1000000" # 1 USDC - HUGE LOSS! >>> # )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expired_atNo
input_mintYes
output_mintYes
slippage_bpsNo
making_amountYes
taking_amountYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries full burden and delivers: it states the function is free, does not execute transactions, returns an unsigned transaction, discloses price validation gaps, min order size, transfer tax, slippage behavior, and referral inclusion.

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?

Though lengthy, the structure uses headings, numbered warnings, and an example. The content is dense with essential warnings rather than filler; every section serves a purpose.

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

Completeness5/5

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

The description covers purpose, parameters, return structure, warnings, and includes a realistic example with both safe and dangerous cases. Given the tool's complexity and dangerous failure modes, it is complete.

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

Parameters5/5

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

Schema descriptions are absent (0% coverage), but the 'Args' section explains each parameter including units (smallest unit, basis points, Unix timestamp) and provides concrete examples showing decimals.

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 opens with a clear, specific statement: 'Create a limit order that executes when target price is reached.' It further clarifies it returns an unsigned transaction, distinguishing it from execution/cancellation siblings.

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

Usage Guidelines4/5

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

It provides extensive context on when to use this tool (to create a limit order without executing) and warns against misuse (price validation, transfer tax, minimum size). However, it does not explicitly name alternative tools like execute_limit_order or get_swap_quote, so it lacks explicit exclusions.

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

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