trading_agent.tools.get_orders_tool
¶
The get_orders tool: the order book, the trades, or the orders UBI's engine is holding.
Typical usage example:
tool = GetOrdersTool(reader, formatter)
GetOrdersArguments
¶
Bases: BaseModel
The arguments of get_orders.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['orders', 'trades', 'open_parents']
|
"orders" for today's orders at the brokers, "trades" for today's fills, "open_parents" for orders UBI's engine is still holding or working, such as limit orders and stops. |
GetOrdersTool
¶
Bases: BrokerTool
Reads the order book.
Source code in src/trading_agent/tools/broker_tool.py
run
async
¶
Reads the order book.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arguments
|
GetOrdersArguments
|
Which book. |
required |
Returns:
| Type | Description |
|---|---|
ToolResult
|
UBI's answer, or an error. |