> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bulk.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger Basket

> Execute a basket of actions when a threshold is crossed

> [!NOTE]
>
> Submit this action through the signed WebSocket `post` envelope. See the
> [request format](https://docs.bulk.trade/api-reference/ws-trading.md#post-request-format) and
> [Transaction Signing](https://docs.bulk.trade/api-reference/signing.md) for nonce, signature, and
> canonical encoding requirements. These examples contain illustrative nonces
> and placeholder signatures; sign the exact payload with a fresh nonce before use.

```json Request theme={null}
{
  "method": "post",
  "request": {
    "type": "action",
    "payload": {
      "actions": [
        {"trig": {"c": "BTC-USD", "d": true, "tr": 105000.0, "actions": [
          {"m": {"c": "BTC-USD", "b": true, "sz": 0.1, "r": false, "i": false}},
          {"cx": {"c": "BTC-USD", "oid": "Fpa3oVuL3UzjNANAMZZdmrn6D1Zhk83GmBuJpuAWG51F"}}
        ]}}
      ],
      "nonce": "1704067200000000014",
      "account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "signature": "5j7s...base58..."
    }
  },
  "id": 14
}
```

```json Response (Resting) theme={null}
{
  "type": "post",
  "id": 14,
  "data": {
    "type": "action",
    "payload": {
      "status": "ok",
      "response": {
        "type": "order",
        "data": {
          "statuses": [{"resting": {"oid": "AoV5pSiIRlJHZ9xPsCUjzqo2jsqe18HjXfCD8Hp7STk0"}}]
        }
      }
    }
  }
}
```

```json Response (Triggered) theme={null}
{
  "type": "post",
  "id": 14,
  "data": {
    "type": "action",
    "payload": {
      "status": "ok",
      "response": {
        "type": "order",
        "data": {
          "statuses": [{"triggered": {"oid": "AoV5pSiIRlJHZ9xPsCUjzqo2jsqe18HjXfCD8Hp7STk0"}}]
        }
      }
    }
  }
}
```

```json Response (Trigger Failed) theme={null}
{
  "type": "post",
  "id": 14,
  "data": {
    "type": "action",
    "payload": {
      "status": "ok",
      "response": {
        "type": "order",
        "data": {
          "statuses": [{"triggerFailed": {"oid": "AoV5pSiIRlJHZ9xPsCUjzqo2jsqe18HjXfCD8Hp7STk0", "reason": "conditional execution failed: no counterparty"}}]
        }
      }
    }
  }
}
```

**Trigger basket (`trig`) fields:** `c` (symbol), `d` (trigger direction: `true` = above/equal), `tr` (trigger threshold), `actions` (nested actions executed when trigger fires).

Nested actions support: `m`, `l`, `mod`, `cx`, `cxa`, `st`, `tp`, `rng`, `trl`.

The basket has no top-level `i` flag. Each nested action controls its own
isolated routing. Later lifecycle changes arrive on the account subscription;
the examples do not promise a second response to the original `post` ID.

## Responses and errors

See the shared [response format](https://docs.bulk.trade/api-reference/ws-trading.md#response-format),
[status types](https://docs.bulk.trade/api-reference/ws-trading.md#status-types), and
[error handling](https://docs.bulk.trade/api-reference/ws-trading.md#error-handling). Follow subsequent
order and fill events through the [account stream](https://docs.bulk.trade/api-reference/ws-account.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.