Skip to main content
Glama

cancel_limit_orders

Cancel multiple limit orders in batches of five, or all open orders at once. Returns unsigned transactions for signing and execution.

Instructions

Cancel multiple limit orders (batched in groups of 5).

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

Args: orders: Array of order account addresses. If None/empty, cancels ALL orders

Returns: Dictionary containing: - success: Boolean indicating if the request was successful - data: Contains 'transactions' (array of unsigned) and 'requestId' - error: Error message if request failed

Note: - Returns multiple transactions if >5 orders - Each transaction needs to be signed and executed separately - Uses configured wallet as maker

Example: >>> # Cancel specific orders >>> result = await api.cancel_limit_orders( ... orders=["order1_address", "order2_address", "order3_address"] ... ) >>> >>> # Cancel ALL orders >>> result = await api.cancel_limit_orders() >>> if result["success"]: ... # Execute each cancellation transaction ... for tx in result["data"]["transactions"]: ... exec_result = await api.execute_limit_order( ... transaction=tx, ... request_id=result["data"]["requestId"] ... )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ordersNo

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 fully discloses behavioral traits: it is free, performs no transactions, returns unsigned transactions, and requires each to be signed and executed separately. It also documents the 'success' and 'requestId' response fields, covering safety and workflow expectations.

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?

The description is well-structured with intro, Args, Returns, Note, and Example sections. It is concise for the tool's complexity, with the main purpose stated upfront and no redundant information.

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?

Given the tool's complexity (batching, unsigned transactions, optional input, separate execution), the description covers all necessary aspects, including multi-transaction behavior and example usage. The presence of an output schema does not reduce the completeness since the description still explains critical workflow details.

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?

The schema only defines 'orders' as an array/null with no description. The description adds essential meaning: 'Array of order account addresses' and the special case that None/empty cancels ALL orders. Since schema description coverage is 0%, this fully compensates.

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 states 'Cancel multiple limit orders (batched in groups of 5)' with a clear verb and resource. It also clarifies the empty-input behavior (cancels ALL orders), which distinguishes it from the sibling tool 'cancel_limit_order'.

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 clear when-to-use context, including 'FREE to call', 'does not execute any transactions', and that it returns unsigned transactions requiring separate signing/execution. However, it does not explicitly reference alternative tools or state 'when not to use', though the batching vs. singular nature is implied.

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