cancel_order
Cancel specific trading orders on Bybit by specifying the category, symbol, and optional order ID or link ID. Simplify order management and ensure accurate execution of trading strategies.
Instructions
Cancel order
Args:
category (str): Category (spot, linear, inverse, etc.)
symbol (str): Symbol (e.g., BTCUSDT)
orderId (Optional[str]): Order ID
orderLinkId (Optional[str]): Order link ID
orderFilter (Optional[str]): Order filter
Returns:
Dict: Cancel result
Example:
cancel_order("spot", "BTCUSDT", "123456789")
Reference:
https://bybit-exchange.github.io/docs/v5/order/cancel-order
Input Schema
Name | Required | Description | Default |
---|---|---|---|
category | Yes | Category (spot, linear, inverse, etc.) | |
orderFilter | No | Order filter | |
orderId | No | Order ID | |
orderLinkId | No | Order link ID | |
symbol | Yes | Symbol (e.g., BTCUSDT) |
Input Schema (JSON Schema)
{
"properties": {
"category": {
"description": "Category (spot, linear, inverse, etc.)",
"title": "Category",
"type": "string"
},
"orderFilter": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Order filter",
"title": "Orderfilter"
},
"orderId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Order ID",
"title": "Orderid"
},
"orderLinkId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Order link ID",
"title": "Orderlinkid"
},
"symbol": {
"description": "Symbol (e.g., BTCUSDT)",
"title": "Symbol",
"type": "string"
}
},
"required": [
"category",
"symbol"
],
"title": "cancel_orderArguments",
"type": "object"
}