trading_agent.trading.instrument_arguments
¶
How a model names one instrument, as tool arguments.
The fields follow tradingmachine_mcp's InstrumentDescription, which follows tradingmachine's own Instrument constructor: either UBI's id, or the exchange and segment with the identity fields the segment needs.
Typical usage example:
arguments = InstrumentArguments(exchange='nse', segment='equities', symbol='INFY')
InstrumentArguments
¶
Bases: BaseModel
One instrument.
Attributes:
| Name | Type | Description |
|---|---|---|
instrument_id |
str | None
|
UBI's id for the instrument; when given, the other fields are ignored. |
exchange |
str | None
|
The lower-case exchange, such as nse, bse or mcx. |
segment |
str | None
|
The segment, such as equities, equity_indices, equity_futures or equity_options. |
symbol |
str | None
|
The symbol of a share, index or fund, such as INFY or NIFTY; empty for futures and options. |
underlying_symbol |
str | None
|
What a future or option is written on, such as NIFTY. |
expiry_date |
str | None
|
A future's or option's expiry, as YYYY-MM-DD. |
strike_price |
float | None
|
An option's strike price. |
option_type |
str | None
|
CE for a call or PE for a put. |