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

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.

主站蜘蛛池模板: 齐河县| 东安县| 沧州市| 屯门区| 平乡县| 鄂托克旗| 通城县| 镇康县| 丹寨县| 昂仁县| 中超| 娱乐| 喜德县| 仁化县| 南安市| 伊金霍洛旗| 新巴尔虎左旗| 龙南县| 台中市| 琼海市| 公安县| 浦东新区| 屯留县| 灵台县| 社旗县| 合水县| 荆州市| 凤山市| 太仓市| 威信县| 深州市| 桓台县| 芒康县| 台安县| 邹城市| 彰化市| 逊克县| 溆浦县| 合水县| 辽宁省| 海安县|