Hi, Having a query related to option symbols. Some time I got the symbols like "BANKNIFTY2392038000CE", "BANKNIFTY2392038500PE" and some time did not get it. Some time format be like this: BANKNIFTY23OCT38000PE, BANKNIFTY23OCT40000CE.
I have to form trading symbol dynamically on the basis of nifty bank LTP. So, we have to follow one proper rule. Please suggest!
as per my knowledge
#For Monthly Expiry
monthly expiry format ==>INDEX_NAME + YEAR + MONTH_NAME + STRIKE + INSTRUMENT_TYPE
ex.,
BANKNIFTY+23+OCT+40000+CE
#For Weekly Expiry JAN-SEP
all weekly expiry format ==>INDEX_NAME + YYMDD + STRIKE + INSTRUMENT_TYPE
ex.,
BANKNIFTY+23+9+20+40000+CE
#For Weekly Expiry OCT-DEC
again for M ==>{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:'O',11:'N',12:'D'}
ex.,
BANKNIFTY+23+N+01+44500+CE
Should I continue with this logic?