trading_agent.tools.get_portfolio_tool
¶
The get_portfolio tool: the account's positions, holdings or funds across every broker.
Typical usage example:
tool = GetPortfolioTool(reader, formatter)
GetPortfolioArguments
¶
Bases: BaseModel
The arguments of get_portfolio.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
Literal['positions', 'holdings', 'funds']
|
"positions" for today's and carried positions, "holdings" for delivery holdings, "funds" for balances and margins. |
GetPortfolioTool
¶
Bases: BrokerTool
Reads one part of the portfolio.
Source code in src/trading_agent/tools/broker_tool.py
run
async
¶
Reads the part of the portfolio.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arguments
|
GetPortfolioArguments
|
Which part. |
required |
Returns:
| Type | Description |
|---|---|
ToolResult
|
UBI's answer, or an error. |