Skip to content

Cancel Order

Use this page to cancel Trading API V3 orders through the REST API. The same cancel endpoint is used for full orders and selected exit triggers.

Use this same Trading API V3 cancel endpoint for:

  • single orders
  • independent multi-order items
  • strategy orders

For Trading API V3 strategy orders created with isMultiLeg: true, the placement response contains one strategy-level intentOrderId. Use that same ID to cancel the full strategy order. Do not use basketId, and do not send legs or isMultiLeg in the cancel request.

Scope

To cancel a full order, pass {"orderId": intent_order_id}. To cancel a selected exit trigger, pass {"orderId": intent_order_id, "exitTriggerKind": "STOPLOSS"} or the relevant trigger kind.

Endpoint

Method: POST
Endpoint: sentinel/orders/cancel

Basic Usage

curl --location 'https://uatapi.nubra.io/sentinel/orders/cancel' \
--header 'x-device-id: {{x_device_id}}' \
--header 'x-app-version: 0.4.5' \
--header 'x-device-os: sdk' \
--header 'Cookie: deviceId={{x_device_id}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{session_token}}' \
--data '{
  "orders": [
    {
      "orderId": 987654
    }
  ]
}'

Omitting exitTriggerKind cancels the full Trading API V3 order.

Cancel Full Order Patterns

These examples all use the same Trading API V3 cancellation endpoint. The only difference is which intentOrderId values you pass.

{
  "orders": [
    {
      "orderId": 987654
    }
  ]
}

Use this pattern when cancelling one independent single-instrument Trading API V3 order.

{
  "orders": [
    {
      "orderId": 987654
    },
    {
      "orderId": 987655
    }
  ]
}

Use this pattern when cancelling multiple independent orders that were placed together through Place Multi Order. Each item has its own intentOrderId; cancel only the items that should be cancelled.

{
  "orders": [
    {
      "orderId": 987654
    }
  ]
}

Use this pattern when cancelling one strategy order. The orderId is the intentOrderId returned by the isMultiLeg: true placement response.

Cancel Exit Trigger Patterns

Use exitTriggerKind when the order should remain active but a selected attached exit trigger should be cancelled.

{
  "orders": [
    {
      "orderId": 987654,
      "exitTriggerKind": "STOPLOSS"
    }
  ]
}

Use this pattern to cancel only the stop-loss exit trigger attached to the Trading API V3 order.

{
  "orders": [
    {
      "orderId": 987654,
      "exitTriggerKind": "TARGET_PROFIT"
    }
  ]
}

Use this pattern to cancel only the target-profit exit trigger attached to the Trading API V3 order.

{
  "orders": [
    {
      "orderId": 987654,
      "exitTriggerKind": "TRAILING_STOP"
    }
  ]
}

Use this pattern to cancel only the trailing stop-loss exit trigger attached to the Trading API V3 order.

{
  "orders": [
    {
      "orderId": 987654,
      "exitTriggerKind": "STOPLOSS"
    },
    {
      "orderId": 987655,
      "exitTriggerKind": "TARGET_PROFIT"
    }
  ]
}

Use this pattern when cancelling selected exit triggers across multiple Trading API V3 orders.

Request Attributes

Field Type Required Meaning
orders array yes Cancel request items.
orders[].orderId int yes Trading API V3 intentOrderId returned by placement or order retrieval.
orders[].exitTriggerKind string no STOPLOSS, TARGET_PROFIT, or TRAILING_STOP; omit to cancel the full order.

Order ID Sources

Order type Which ID to cancel Notes
Single order orders[0].intentOrderId Returned by Place Single Order.
Multi order each orders[i].intentOrderId Returned by Place Multi Order; each independent item has its own ID.
Strategy order strategy orders[0].intentOrderId One ID represents the full strategy. legs[] are details under the strategy and do not have cancel IDs.

Response Structure

{
  "message": "order cancellation request pushed successfully"
}

Treat cancellation as an acknowledgement and fetch current state with Get Orders afterwards when control flow depends on final status.

Important Rules

Important Rules

  • Pass IDs from the active environment.
  • Use Trading API V3 intentOrderId values for all cancellation flows.
  • Single, multi-order, and strategy order cancellation use the same Trading API V3 cancel endpoint.
  • For a strategy order, pass the strategy-level intentOrderId; do not pass basketId.
  • Cancellation is a request, not a guarantee that execution state can always be reversed.
  • Omit exitTriggerKind when the goal is to cancel the full order.
  • Pass exitTriggerKind only when cancelling a specific exit trigger.
  • Inspect latest state with Get Orders when cancellation status matters.
  1. Get Orders
  2. Place Single Order
  3. Place Multi Order
  4. Place Strategy Order
NEO Assistant