orders
Orders
Storage class for orders.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
orders
|
Sequence[Order] | None
|
|
None
|
is_empty
property
Check if the storage is empty.
add(orders)
Add new orders to the storage and sort them by timestamp.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
orders
|
list[Order]
|
|
required |
dequeue()
Get the earliest order and remove it from the storage.
Returns:
| Type | Description |
|---|---|
Order
|
Earliest order |
remove(orders)
Remove a list of orders from the storage matching by order_id.
Partially executed orders may have their properties changed, hence matching is done only based on the id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
orders
|
list[Order]
|
|
required |
to_frame()
Get pandas DataFrame with all orders in the storage.
Returns:
| Type | Description |
|---|---|
DataFrame[OrderDataSchema]
|
|