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

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.

主站蜘蛛池模板: 普兰店市| 渝北区| 南城县| 探索| 深水埗区| 西吉县| 吉隆县| 苗栗县| 孝昌县| 嵊州市| 蒙城县| 高雄市| 开化县| 东辽县| 石河子市| 剑河县| 十堰市| 定安县| 佛山市| 吕梁市| 华容县| 阜新市| 河池市| 江山市| 德州市| 宜春市| 巴林左旗| 陕西省| 斗六市| 通化市| 敦化市| 扶绥县| 桐柏县| 夏河县| 灵石县| 句容市| 灌南县| 卢湾区| 杭锦后旗| 黄骅市| 江城|