- Python Algorithmic Trading Cookbook
- Pushpak Dagade
- 178字
- 2021-06-11 18:29:25
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.
- 西門子S7-200 SMART PLC從入門到精通
- Hands-On Data Science with SQL Server 2017
- 數(shù)控銑削(加工中心)編程與加工
- Visual C++編程全能詞典
- INSTANT Drools Starter
- Grome Terrain Modeling with Ogre3D,UDK,and Unity3D
- 教育機器人的風口:全球發(fā)展現(xiàn)狀及趨勢
- Visual C++項目開發(fā)案例精粹
- R Machine Learning Projects
- 從零開始學SQL Server
- 云計算和大數(shù)據(jù)的應用
- 案例解說Delphi典型控制應用
- Learning Cassandra for Administrators
- 特征工程入門與實踐
- 數(shù)據(jù)結構與算法(C++語言版)