官术网_书友最值得收藏!

Attributes of a financial instrument

Financial instruments have various attributes that give more insight into the instrument, such as the trading symbol, exchange, segment, tick size, and so on. Some of these attributes are also needed while placing orders. This recipe lists and explains all the attributes supported by the broker. All the attributes are static, meaning they don't change during the live trading hours.

Getting ready

Make sure the instruments object is available in your Python namespace. Refer to the Fetching the list of financial instruments recipe of this chapter to set it up.

How to do it…

List all the attributes of a financial instrument provided by the broker:

>>> list(instruments.columns)

We get the following output:

['instrument_token',
'exchange_token',
trading-symbol,
'name',
'last_price',
'expiry',
'strike',
'tick_size',
'lot_size',
'instrument_type',
'segment',
exchange]

How it works…

The Fetching a list of financial instruments recipe fetches all the instruments as a pandas.DataFrame object. Calling its columns attribute returns all the columns available. Each column is an attribute for every financial instrument. You can find more details at https://kite.trade/docs/connect/v3/market-quotes/#csv-response-columns.

主站蜘蛛池模板: 辉县市| 西城区| 乌拉特中旗| 丹凤县| 惠水县| 大城县| 定边县| 兴仁县| 扶绥县| 卫辉市| 志丹县| 苍梧县| 云霄县| 定襄县| 忻城县| 义乌市| 武威市| 长沙县| 乌拉特前旗| 璧山县| 泌阳县| 普兰店市| 丰都县| 绵阳市| 达尔| 瓦房店市| 尤溪县| 河池市| 仙桃市| 噶尔县| 长海县| 横峰县| 梁山县| 若尔盖县| 武威市| 托里县| 深州市| 渭源县| 会理县| 米林县| 兰州市|