Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

cancelAllOrders

Cancel all open orders for spot, linear, inverse, or options. Specify symbol or order filter to target specific types. Clears positions in bulk.

Instructions

Cancel all open orders matching the specified criteria.

  • For linear/inverse: must provide at least symbol, baseCoin, or settleCoin

  • For options: cancel all option orders without any additional filter

  • For spot: defaults to cancelling all regular orders

  • Use orderFilter to target specific order types (normal, TP/SL, stop, OCO)

  • Response is acknowledgment only; confirm via WebSocket order stream

Agent hint: Use this endpoint to cancel all open orders for a category/symbol at once. For cancelling a single order, use cancelOrder instead. TradFi: use category=spot to cancel all xStock orders, category=linear for equity/commodity perpetuals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYes
symbolNo
baseCoinNo
settleCoinNo
orderFilterNo
stopOrderTypeNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that cancellation is by criteria and that response is acknowledgment only (confirm via WebSocket). However, it does not mention idempotency, rate limits, or potential partial failures. The description adds some behavioral context but not exhaustive.

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

Conciseness4/5

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

The description is well-structured with bullet points and an agent hint. It is front-loaded with the main purpose. Each sentence adds value, though the text could be slightly more concise without losing clarity.

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

Completeness4/5

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

Given the tool's complexity (6 parameters, no output schema) and many sibling tools, the description covers cancellation criteria, category-specific behavior, and suggests alternative tools. It lacks details on response structure beyond 'acknowledgment' and synchronous vs async behavior, but the WebSocket hint partially addresses confirmation. Overall fairly 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 description coverage is 0%, so the description must compensate. It explains each parameter: category (required), symbol, baseCoin, settleCoin, orderFilter, stopOrderType. It provides category-specific rules (e.g., must provide at least one symbol/baseCoin/settleCoin for linear/inverse, no filter for options, default for spot). This adds significant meaning beyond the schema enum values.

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 'Cancel all open orders matching the specified criteria.' It uses a specific verb (cancel) and resource (all open orders), and distinguishes from the sibling tool 'cancelOrder' for single order cancellation. Different category-specific behaviors are detailed.

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

Usage Guidelines5/5

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

Explicitly states when to use: 'Use this endpoint to cancel all open orders for a category/symbol at once.' Provides alternatives: 'For cancelling a single order, use cancelOrder instead.' Includes conditional requirements for linear/inverse and defaults for spot and options.

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/bybit-exchange/trading-mcp'

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