如何读取命名元组字段值

时间:2019-06-15 18:17:19

标签: python-3.x

我已经输出了类似下面的内容,有人可以帮我阅读特定符号的lot_size吗?

20188 Instrument(exchange='NSE_EQ', token=20188, parent_token=None, symbol='wabag', name='VA TECH WABAG LTD', closing_price=320.45, expiry=None, strike_price=None, tick_size=5.0, lot_size=1, instrument_type='EQUITY', isin='INE956G01038')

16915 Instrument(exchange='NSE_EQ', token=16915, parent_token=None, symbol='wabcoindia', name='WABCO INDIA LIMITED', closing_price=6121.75, expiry=None, strike_price=None, tick_size=5.0, lot_size=1, instrument_type='EQUITY', isin='INE342J01019')

3736 Instrument(exchange='NSE_EQ', token=3736, parent_token=None, symbol='walchannag', name='WALCHANDNAGAR INDUSTRIES', closing_price=86.75, expiry=None, strike_price=None, tick_size=5.0, lot_size=1, instrument_type='EQUITY', isin='INE711A01022')


contract = u.get_master_contract('NSE_FO')
for key,value in contract.items():
 print(key,value)

contract = u.get_master_contract('NSE_FO')
for key,value in contract.items():
 print(key,value)

如果instrument_type ='FUTSTK',我如何获得交易品种lot_size?

0 个答案:

没有答案