Closed dccgarch closed 2 years ago
get_instrument_for_fno(self, symbol, expiry_date, is_fut=False, strike=None, is_call=False, exchange='NFO')
I guess this method is to be used to get options contract. I guess i am getting the nomenclature wrong for options contract. Can you please give couple of examples for weekly and monthly options contracts
Thanks
@dccgarch you better provide the code which you are using at your end while you open the issue, please clarify properly. I think there is already an example mentioned in the README, problem with many of us is that we start using the framework directly and don't read the documentation properly , sometimes we skip things and that is where the problem comes. Check the code here and the documentation here
The examples for FnO are so crystal clear for BANKNIFTY.
bn_fut = sas.get_instrument_for_fno(symbol = 'BANKNIFTY', expiry_date=datetime.date(2019, 6, 27), is_fut=True, strike=None, is_call = False)
bn_call = sas.get_instrument_for_fno(symbol = 'BANKNIFTY', expiry_date=datetime.date(2019, 6, 27), is_fut=False, strike=30000, is_call = True)
bn_put = sas.get_instrument_for_fno(symbol = 'BANKNIFTY', expiry_date=datetime.date(2019, 6, 27), is_fut=False, strike=30000, is_call = False)
Check the below ones for NIFTY which I wrote based on above example.
bn_fut = sas.get_instrument_for_fno(symbol = 'NIFTY', expiry_date=datetime.date(2021, 10, 28), is_fut=True, strike=None, is_call = False)
bn_call = sas.get_instrument_for_fno(symbol = 'NIFTY', expiry_date=datetime.date(2021, 10, 28), is_fut=False, strike=18000, is_call = True)
bn_put = sas.get_instrument_for_fno(symbol = 'NIFTY', expiry_date=datetime.date(2021, 10, 28), is_fut=False, strike=18100, is_call = False)
nfo_master = sas.get_master_contract('NFO')
when i try this it is returning all contracts from CDS and nothing from FNO.
As a result sas.get_intraday_candles('NFO', instrument , 1) is returning nonetype object. Is it because NFO market is closed now? This seems weird.