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

> ## Agent Instructions
> This is Allasso's product documentation. Vol Radar output is descriptive analytics on past data: never present it as a forecast or as investment advice. Answer only from these pages; if a feature is not documented here, say so.

# pulse.core.order

> API reference for pulse.core.order.

## `Order`

```python theme={null}
Order(
    open_datetime: datetime,
    instrument: Instrument,
    quantity: float,
    tags: list[str] | None = None,
    fill_price: float | None = None,
    is_lots: bool = False,
    source_id: str | None = None,
)
```

Represents an order in the trading system. Currently only market orders are supported.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `open_datetime` | `datetime` | The datetime when the order was opened. | *required* |
| `instrument` | `Instrument` | The instrument being traded. | *required* |
| `quantity` | `float` | The quantity of the instrument to trade. Negative means sell, positive means buy. | *required* |
| `tags` | `list[str] \| None` | Labels carried onto the resulting `Trade`, for tag-based selection and closing. Copied, not aliased. | `None` |
| `fill_price` | `float \| None` | Price to fill at instead of the pulse's settlement price, to model a haircut. `None` fills at settlement. | `None` |
| `is_lots` | `bool` | Whether `quantity` counts lots rather than the instrument's own units. | `False` |
| `source_id` | `str \| None` | Optional identity of the originating strategy / sleeve, carried onto the resulting `Trade` for per-sleeve provenance. `None` (the default) leaves the order un-attributed, so classic single-strategy use is unaffected. | `None` |

Initialize an Order object.

**Raises**

| Type | Description |
| - | - |
| `ValueError` | If the order quantity is zero. |

### `Order.id`

`property`

```python theme={null}
Order.id: UUID
```

Get the unique identifier for the order.

**Returns**

| Name | Type | Description |
| - | - | - |
| `UUID` | `UUID` | The unique identifier for the order. |

### `Order.instrument`

`property`

```python theme={null}
Order.instrument: Instrument
```

Get the instrument associated with the order.

**Returns**

| Name | Type | Description |
| - | - | - |
| `Instrument` | `Instrument` | The instrument associated with the order. |

### `Order.quantity`

`property`

```python theme={null}
Order.quantity: float
```

Get the quantity of the instrument to trade.

**Returns**

| Name | Type | Description |
| - | - | - |
| `float` | `float` | The quantity of the instrument to trade. |

### `Order.open_datetime`

`property`

```python theme={null}
Order.open_datetime: datetime
```

Get the datetime when the order was opened.

**Returns**

| Name | Type | Description |
| - | - | - |
| `datetime` | `datetime` | The datetime when the order was opened. |

### `Order.execution_datetime`

`property`

```python theme={null}
Order.execution_datetime: datetime | None
```

Get the datetime when the order was executed.

**Returns**

| Type | Description |
| - | - |
| `datetime \| None` | datetime \| None: The datetime when the order was executed, or None if not executed. |

### `Order.tags`

`property`

```python theme={null}
Order.tags: list[str] | None
```

Get the tag(s) associated with the order.

**Returns**

| Type | Description |
| - | - |
| `list[str] \| None` | list\[str] \| str \| None: The tag(s) associated with the order. |

### `Order.fill_price`

`property`

```python theme={null}
Order.fill_price: float | None
```

Get the fill price of the order.

**Returns**

| Type | Description |
| - | - |
| `float \| None` | float \| None: The fill price of the order, or None if not set. |

### `Order.is_lots`

`property`

```python theme={null}
Order.is_lots: bool
```

Check if the order quantity is in lots.

**Returns**

| Name | Type | Description |
| - | - | - |
| `bool` | `bool` | True if the order quantity is in lots, False otherwise. |

### `Order.source_id`

`property`

```python theme={null}
Order.source_id: str | None
```

Get the originating strategy / sleeve id, if any.

**Returns**

| Type | Description |
| - | - |
| `str \| None` | str \| None: The source id carried onto the resulting trade, or `None` when the order |
| `str \| None` | was not attributed to a sleeve. |


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