trading_agent.terminal.widgets.orders_card
¶
The side panel's Orders and trades card: today's orders placed and cancelled, trades, open orders and stocks held.
The counts of orders and trades come from today's events of the desk, as on the web page; open orders and stocks held come from the gateway.
Typical usage example:
card = OrdersCard() card.show('general', events, open_orders, account)
OrdersCard
¶
Bases: SideCard
The Orders and trades card.
Creates the card.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
collapsed
|
bool
|
Whether it starts folded. |
False
|
Source code in src/trading_agent/terminal/widgets/orders_card.py
show
¶
Shows the counts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
desk_name
|
str
|
The desk the chat shows. |
required |
events
|
Sequence[dict[str, Any]]
|
The desk's events of today. |
required |
open_orders
|
list[dict[str, Any]] | None
|
The desk's open orders, or None when not known. |
required |
account
|
dict[str, Any] | None
|
The account, or None when not known. |
required |