---
updatedAt: 2026-06-19T20:31:55.000Z
agentTools:
  projectIndex: https://docs.zerohash.com/llms.txt
---

# Portfolio Strategy Executions

Webhook events triggered by portfolio strategy execution activity.

## `trade_strategy.execution.status_changed`

An **execution** is the per-participant portion of an operation. Each execution carries one or more `instructions` — the actual buy/sell orders against the underlying assets. Each execution emits **two** webhooks:&#x20;

1. Upon creation (`awaiting_execution`) so you learn the `execution.id`.&#x20;
2. &#x20;Upon terminal transition (`settled` or `rejected`).&#x20;

Soft-rejected executions skip the `awaiting_execution` event and emit only `rejected`.

| Parameter          | Description                                                                                                                              | Type          |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `id`               | Unique identifier for this execution.                                                                                                    | string (UUID) |
| `strategy_id`      | Identifier of the strategy this execution belongs to.                                                                                    | string (UUID) |
| `operation_id`     | Identifier of the parent operation.                                                                                                      | string (UUID) |
| `trader_id`        | Identifier of the trader (participant enrolled into the strategy) the execution is for. Empty when the execution is rejected pre-trader. | string (UUID) |
| `participant_code` | The zerohash identifier for the participant being executed against.                                                                      | string        |
| `account_label`    | The account label used for the execution. Matches the strategy ID for trader accounts. Empty when the execution is rejected pre-trader.  | string        |
| `status`           | Current execution status. See [Execution statuses](#execution-statuses).                                                                 | string        |
| `status_reason`    | Machine-readable reason. Empty when not applicable. See [Execution status reasons](#execution-status-reasons).                           | string        |
| `instructions`     | Array of per-instrument instructions. Each instruction carries its own status and, once executed, the trade fill details.                | array         |
| `created_at`       | Execution creation timestamp (UTC, RFC3339).                                                                                             | string        |
| `updated_at`       | Timestamp of the transition that triggered this webhook (UTC, RFC3339).                                                                  | string        |

### Execution statuses

| Status               | Description                                                                                                                                                      |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `awaiting_execution` | Execution accepted; instructions are queued and pending fill.                                                                                                    |
| `settled`            | All instructions executed and the resulting balances posted to the trader account.                                                                               |
| `skipped`            | Execution completed without performing any trades. *(Planned — fires once the rebalance / dust-skip flow lands; current executions do not produce this status.)* |
| `rejected`           | Execution was rejected before any trades took place. Check `status_reason` for details.                                                                          |

### Execution status reasons

| Reason                     | Description                                                                                                                                                                    |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `participant_not_approved` | Participant is not in an approved state for trade strategy.                                                                                                                    |
| `participant_not_found`    | Participant code does not exist.                                                                                                                                               |
| `trader_already_enrolled`  | Enrollment attempted for a participant already enrolled in this strategy.                                                                                                      |
| `trader_not_enrolled`      | Top-up or partial-sell attempted for a participant that is not enrolled in this strategy.                                                                                      |
| `trader_not_found`         | Trader record could not be located.                                                                                                                                            |
| `insufficient_funds`       | Trader account does not have enough balance to satisfy the execution. Covers both buy-side (insufficient fiat) and sell-side partial-sell (insufficient crypto holdings).      |
| `below_instrument_minimum` | Per-asset notional fell below the configured minimum trade volume for one of the requested instruments; the worker rejects the entire execution under the all-or-nothing rule. |

### Instruction object

Each entry in the `instructions` array carries the trade-level detail. Post-fill fields appear only when the instruction reaches `executed`.

| Field                 | Type   | Description                                                                                   |
| --------------------- | ------ | --------------------------------------------------------------------------------------------- |
| `underlying_currency` | string | Asset being traded (e.g. `BTC`).                                                              |
| `quoted_currency`     | string | Quote currency (e.g. `USD`).                                                                  |
| `side`                | string | `buy` or `sell`.                                                                              |
| `amount`              | string | Instruction amount in the unit indicated by `amount_type`.                                    |
| `amount_type`         | string | `notional` or `quantity`.                                                                     |
| `status`              | string | `pending` until filled, then `executed` (or other terminal state).                            |
| `status_reason`       | string | Machine-readable reason. Empty when not applicable.                                           |
| `price`               | string | Fill price (quoted currency per 1 unit underlying). Present only when `status` is `executed`. |
| `quantity`            | string | Filled quantity of the underlying. Present only when `status` is `executed`.                  |
| `total_notional`      | string | Filled notional in quoted currency. Present only when `status` is `executed`.                 |
| `trade_ids`           | array  | zerohash trade IDs that satisfied this instruction. Present only when `status` is `executed`. |
| `executed_at`         | string | Fill timestamp (UTC, RFC3339). Present only when `status` is `executed`.                      |

<br />

***

### Payload Examples

#### Execution status `awaiting_execution`

Instructions are still `pending`; post-fill fields are omitted.

```json
{
    "id": "97b215ed-6985-32c5-b856-77efc9614467",
    "strategy_id": "9ba5e569-a966-42a9-a7ad-666b0a5300f3",
    "operation_id": "663a258c-5e7c-456f-9759-73e02db8b5d9",
    "trader_id": "bd92c25a-eaf8-3e95-ab7a-59f3e2275234",
    "participant_code": "ABC123",
    "account_label": "9ba5e569-a966-42a9-a7ad-666b0a5300f3",
    "status": "awaiting_execution",
    "status_reason": "",
    "instructions": [
        {
            "underlying_currency": "BTC",
            "quoted_currency": "USD",
            "side": "buy",
            "amount": "5",
            "amount_type": "notional",
            "status": "pending",
            "status_reason": ""
        },
        {
            "underlying_currency": "ETH",
            "quoted_currency": "USD",
            "side": "buy",
            "amount": "5",
            "amount_type": "notional",
            "status": "pending",
            "status_reason": ""
        }
    ],
    "created_at": "2026-05-29T18:56:43Z",
    "updated_at": "2026-05-29T18:56:43Z"
}
```

#### Execution status `settled`

Instructions are `executed`; `price`, `quantity`, `total_notional`, `trade_ids`, and `executed_at` are present.

```json
{
    "id": "97b215ed-6985-32c5-b856-77efc9614467",
    "strategy_id": "9ba5e569-a966-42a9-a7ad-666b0a5300f3",
    "operation_id": "663a258c-5e7c-456f-9759-73e02db8b5d9",
    "trader_id": "bd92c25a-eaf8-3e95-ab7a-59f3e2275234",
    "participant_code": "ABC123",
    "account_label": "9ba5e569-a966-42a9-a7ad-666b0a5300f3",
    "status": "settled",
    "status_reason": "",
    "instructions": [
        {
            "underlying_currency": "BTC",
            "quoted_currency": "USD",
            "side": "buy",
            "amount": "5",
            "amount_type": "notional",
            "status": "executed",
            "status_reason": "",
            "price": "73471.612589025",
            "quantity": "0.00006805",
            "total_notional": "5",
            "trade_ids": ["19f7ae72-48ff-3d37-99e6-24840b83e9c6"],
            "executed_at": "2026-05-29T18:56:46Z"
        },
        {
            "underlying_currency": "ETH",
            "quoted_currency": "USD",
            "side": "buy",
            "amount": "5",
            "amount_type": "notional",
            "status": "executed",
            "status_reason": "",
            "price": "2018.06059005",
            "quantity": "0.0024776263035175",
            "total_notional": "5",
            "trade_ids": ["3f6ef014-fd8f-3897-958e-b6b7eaba14f5"],
            "executed_at": "2026-05-29T18:56:46Z"
        }
    ],
    "created_at": "2026-05-29T18:56:43Z",
    "updated_at": "2026-05-29T18:56:46Z"
}
```

#### Execution status `rejected`

`instructions` is an empty array because no trades took place. The reason is in `status_reason`.

```json
{
    "id": "ae96845f-562a-32f7-9b67-073ed10a20c3",
    "strategy_id": "78e8282c-2363-40c2-879a-52e1ee090e45",
    "operation_id": "7fb46299-9e74-4c14-9f04-172a005e9aca",
    "trader_id": "",
    "participant_code": "ABC123",
    "account_label": "",
    "status": "rejected",
    "status_reason": "trader_not_enrolled",
    "instructions": [],
    "created_at": "2026-05-29T18:40:29Z",
    "updated_at": "2026-05-29T18:40:29Z"
}
```

<br />