One Trading API
REST APIWebSocket API
REST APIWebSocket API
  1. Account
  • Introduction
  • Authenticate
  • Subscribe
  • Ping / Pong
  • Trading
    • Introduction
    • Create Order
    • Cancel All Orders
    • Cancel Order by Client ID
    • Cancel Order by Order ID
    • Margin Update
    • Settlement
    • Funding Payment
    • Order Booked
    • Order Rejected
    • Order Closed
    • Trade Executed
    • Order Fully Filled
    • Move Order
    • Balance Adjustment
  • Orderbook
    • Introduction
    • Orderbook Snapshot
    • Orderbook Update
  • Price Ticks
    • Introduction
    • Price Tick
  • Book Ticker
    • Introduction
    • Book Tick
  • Mark Price
    • Mark Price Update
    • Introduction
  • Account
    • Introduction
    • Exotic Order Registered
    • Exotic Order Updated
    • Exotic Order Activated
    • Exotic Order Triggered
    • Exotic Order Executed
    • Exotic Order Cancelled
  1. Account

Exotic Order Cancelled

You must be subscribed to the ACCOUNT channel to receive take profit / stop loss messages.
The EXOTIC_ORDER_CANCELLED message is sent when a TP/SL ends without completing a close. reason says why.
{
    "channel_name": "ACCOUNT",
    "type": "EXOTIC_ORDER",
    "time": "2026-11-16T11:02:10.512Z",
    "account_id": "726288e6-a463-4f88-9068-024ae8f97a34",
    "event_type": "EXOTIC_ORDER_CANCELLED",
    "event_timestamp": "2026-11-16T11:02:10.000Z",
    "data": {
        "client_id": "0d0b1f0c-7f0e-4f55-9a53-6f6f3c1c2a10",
        "instrument_code": "BTC_USD_P",
        "status": "CANCELLED",
        "previous_status": "ACTIVE",
        "reason": "USER_CANCELLED",
        "version": 2
    }
}
A futures close that stopped before it finished (previous_status is TRIGGERED) also reports what it did, in the same fields as EXOTIC_ORDER_EXECUTED. Whatever it did not close stays open: nothing is retried later.
{
    "channel_name": "ACCOUNT",
    "type": "EXOTIC_ORDER",
    "time": "2026-11-16T12:30:43.512Z",
    "account_id": "726288e6-a463-4f88-9068-024ae8f97a34",
    "event_type": "EXOTIC_ORDER_CANCELLED",
    "event_timestamp": "2026-11-16T12:30:43.000Z",
    "data": {
        "client_id": "0d0b1f0c-7f0e-4f55-9a53-6f6f3c1c2a10",
        "instrument_code": "BTC_USD_P",
        "status": "CANCELLED",
        "previous_status": "TRIGGERED",
        "reason": "INSUFFICIENT_LIQUIDITY",
        "closure_status": "PARTIALLY_CLOSED",
        "position_id": "1b0f6f5e-2a59-4f0a-9d0e-5f7f3f0f6a11",
        "open_volume": "0.4",
        "filled_amount": "1.1",
        "close_orders": [
            {
                "client_id": "1f0c2f6a-5b7e-6d10-9c1e-0242ac120002",
                "amount": "0.70175",
                "status": "FILLED_FULLY",
                "order_id": "7d1c3a52-0c7b-4a55-8f6e-2f1a9b3c4d5e",
                "filled_amount": "0.70175"
            },
            {
                "client_id": "1f0c2f6a-5b7e-6d11-9c1e-0242ac120002",
                "amount": "0.70175",
                "status": "INSUFFICIENT_LIQUIDITY",
                "order_id": "8e2d4b63-1d8c-4b66-9a7f-3a2b0c4d5e6f",
                "filled_amount": "0.39825"
            },
            {
                "client_id": "1f0c2f6a-5b7e-6d12-9c1e-0242ac120002",
                "amount": "0.0965",
                "status": "INSUFFICIENT_LIQUIDITY",
                "order_id": "9f3e5c74-2e9d-4c77-8b80-4b3c1d5e6f70",
                "filled_amount": "0"
            }
        ],
        "version": 2
    }
}
The envelope fields (channel_name, type, time, account_id, event_type, event_timestamp) are described in the ACCOUNT introduction.

data#

FieldTypeDescription
client_idstringIdentifier of the TP/SL. For one attached to an order, that order's client_id.
instrument_codestringThe instrument.
statusstringCANCELLED.
previous_statusstringThe status it was cancelled from: PENDING, ACTIVE or TRIGGERED.
reasonstringWhy it was cancelled: see Reasons.
failed_legsarrayVALIDATION_FAILED_AT_ACTIVATION only. The levels that had already been reached: TP, SL or both.
reference_midnumberVALIDATION_FAILED_AT_ACTIVATION only. The price they were checked against.
closure_statusstringFutures close that stopped only. PARTIALLY_CLOSED when anything filled, FAILED when nothing did.
position_idstring or nullFutures close that stopped only. The position that was being closed.
open_volumestring or nullFutures close that stopped only. What is still open of that position when the close ended, "0" once it is gone. null if it could not be read.
filled_amountstringFutures close that stopped only. The total filled across close_orders.
close_ordersarrayFutures close that stopped only. Every order of the close, in the order they were planned.
close_orders[].client_idstringThe order's client_id, as on its order and trade messages.
close_orders[].amountstringThe most the order was planned to send.
close_orders[].statusstringThe exchange's final status for the order (e.g. FILLED_FULLY), the error code it was refused with, UNKNOWN when no outcome arrived in time, or NOT_SENT when the close ended before it went out.
close_orders[].order_idstring or nullThe exchange's order_id. null for an order that was never placed.
close_orders[].filled_amountstringWhat the order filled. Estimated from the change in the position when its status is UNKNOWN.
versionintegerVersion of the message format: 2. Not the TP/SL's own version.

Reasons#

reasonMeaning
USER_CANCELLEDYou cancelled it by client_id. Also sent when the order of a Create Order request was rejected, and its attached TP/SL was removed.
BULK_CANCELYou cancelled the instrument's TP/SLs by instrument_code.
TP_SL_REMOVEDAn update removed its last level.
FORCE_REPLACEDA new position TP/SL sent with tpsl_force replaced it.
ORDER_CLOSEDThe order it was attached to was cancelled, or closed without a fill, before the TP/SL armed.
ORDER_REJECTEDThe exchange rejected the order it was attached to.
VALIDATION_FAILED_AT_ACTIVATIONA level had already been reached when the TP/SL armed, so it could never fire. The message carries failed_legs and reference_mid.
POSITION_CLOSEDThe position it protected was closed.
POSITION_FLIPPEDA trade reversed the position (a long became a short, or the other way round), so its levels no longer apply.
NO_OPEN_POSITIONA level was reached with no position left to close.
INSUFFICIENT_LIQUIDITYFutures close: every planned order went out, and part of what it set out to close is still open.
EXCHANGE_REJECTEDThe exchange refused a close order.
MARKET_NOT_ACTIVEA level was reached while the market was not taking orders (suspended, closed or post-only).
MAX_RETRIES_EXHAUSTEDThe close could not be placed after its retries.
SPOT_SELL_UNSUPPORTEDSpot: the order it was attached to filled as a sell. A spot TP/SL only protects a buy.
NO_BALANCESpot: a level was reached with none of the bought asset left to sell.
BELOW_MIN_ORDER_VALUESpot: a level was reached, but the sell would be worth less than the market's minimum order value.
New reasons may be added: treat one you do not recognise as a cancellation.
Previous
Exotic Order Executed
Built with