trading_agent.tools.search_instruments_tool
¶
The search_instruments tool: finds securities whose trading symbol contains some text.
Typical usage example:
tool = SearchInstrumentsTool(reader, formatter)
SearchInstrumentsArguments
¶
Bases: BaseModel
The arguments of search_instruments.
Attributes:
| Name | Type | Description |
|---|---|---|
exchange |
str
|
The lower-case exchange, such as nse, bse or mcx. |
segment |
str
|
The segment, such as equities or equity_indices. |
text |
str
|
Text the trading symbol must contain, such as INFY or RELI; company names do not match. |
limit |
int
|
The most results to return. |
SearchInstrumentsTool
¶
Bases: BrokerTool
Searches UBI's instrument list by trading symbol.
Source code in src/trading_agent/tools/broker_tool.py
run
async
¶
Runs the search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arguments
|
SearchInstrumentsArguments
|
Where and what to search. |
required |
Returns:
| Type | Description |
|---|---|
ToolResult
|
The matching instruments, best match first, or an error. |