# Exotic Order Executed


:::caution[]
You must be subscribed to the [ACCOUNT](https://docs.onetrading.com/introduction-374354m0.md) channel to receive take profit / stop loss messages.
:::

The `EXOTIC_ORDER_EXECUTED` message is sent when a triggered TP/SL has done its job. The TP/SL is now `COMPLETE`.

- **Futures:** sent once the close has finished: all it set out to close is closed, or the position is gone. `closure_status` is `CLOSED`, and `close_orders` reports what each order of the close filled.
- **Spot:** sent once the exchange accepts the sell order. Its fills arrive on the TRADING channel; the message carries no `closure_status`, `position_id`, `open_volume`, `filled_amount` or `close_orders`.

A futures close that stops before it finishes is reported with `EXOTIC_ORDER_CANCELLED` instead.

```json
{
    "channel_name": "ACCOUNT",
    "type": "EXOTIC_ORDER",
    "time": "2026-11-16T12:30:43.512Z",
    "account_id": "726288e6-a463-4f88-9068-024ae8f97a34",
    "event_type": "EXOTIC_ORDER_EXECUTED",
    "event_timestamp": "2026-11-16T12:30:43.000Z",
    "data": {
        "client_id": "0d0b1f0c-7f0e-4f55-9a53-6f6f3c1c2a10",
        "instrument_code": "BTC_USD_P",
        "status": "COMPLETE",
        "trigger_source": "SL",
        "close_amount": "1.5",
        "close_side": "SELL",
        "tp_client_id": "c2a7a1de-6d0b-11f0-8de9-0242ac120002",
        "sl_client_id": "1f06d0b6-a7a1-6e20-8de9-0242ac120002",
        "closure_status": "CLOSED",
        "position_id": "1b0f6f5e-2a59-4f0a-9d0e-5f7f3f0f6a11",
        "open_volume": "0",
        "filled_amount": "1.5",
        "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": "FILLED_FULLY",
                "order_id": "8e2d4b63-1d8c-4b66-9a7f-3a2b0c4d5e6f",
                "filled_amount": "0.70175"
            },
            {
                "client_id": "1f0c2f6a-5b7e-6d12-9c1e-0242ac120002",
                "amount": "0.0965",
                "status": "FILLED_FULLY",
                "order_id": "9f3e5c74-2e9d-4c77-8b80-4b3c1d5e6f70",
                "filled_amount": "0.0965"
            }
        ],
        "version": 2
    }
}
```

The envelope fields (`channel_name`, `type`, `time`, `account_id`, `event_type`, `event_timestamp`) are described in the [ACCOUNT introduction](https://docs.onetrading.com/introduction-374354m0.md).

### `data`

| Field | Type | Description |
|---|---|---|
| `client_id` | string | Identifier of the TP/SL. For one attached to an order, that order's `client_id`. |
| `instrument_code` | string | The instrument. |
| `status` | string | `COMPLETE`. |
| `trigger_source` | string | The level that fired: `TP` or `SL`. |
| `close_amount` | string | The amount the close set out to close. |
| `close_side` | string | Side of the close orders: `BUY` or `SELL`. |
| `tp_client_id` | string or null | `client_id` of the close order placed when the take profit fires on a spot market. |
| `sl_client_id` | string or null | As `tp_client_id`, for the stop loss. |
| `closure_status` | string | **Futures.** `CLOSED`. |
| `position_id` | string or null | **Futures.** The position that was being closed. |
| `open_volume` | string or null | **Futures.** What is still open of that position when the close ended, `"0"` once it is gone. `null` if it could not be read. |
| `filled_amount` | string | **Futures.** The total filled across `close_orders`. |
| `close_orders` | array | **Futures.** Every order of the close, in the order they were planned. |
| `close_orders[].client_id` | string | The order's `client_id`, as on its order and trade messages. |
| `close_orders[].amount` | string | The most the order was planned to send. |
| `close_orders[].status` | string | The 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_id` | string or null | The exchange's `order_id`. `null` for an order that was never placed. |
| `close_orders[].filled_amount` | string | What the order filled. Estimated from the change in the position when its status is `UNKNOWN`. |
| `version` | integer | Version of the message format: `2`. Not the TP/SL's own `version`. |