In Call/Put Option chain API. Sometime last option does not includes all keys.
see below response with all the options. I have sent last 2 options.
{
“expiry”: “2024-03-07”,
“pcr”: 0.0,
“strike_price”: 24100.0,
“underlying_key”: “NSE_INDEX|Nifty 50”,
“underlying_spot_price”: 22378.4,
“call_options”: {
“instrument_key”: “NSE_FO|41877”,
“market_data”: {
“ltp”: 0.55,
“volume”: 116750,
“oi”: 33000.0,
“close_price”: 6.9,
“bid_price”: 0.5,
“bid_qty”: 250,
“ask_price”: 0.6,
“ask_qty”: 250,
“prev_oi”: 0.0
},
“option_greeks”: {
“vega”: 0.2657,
“theta”: -0.5858,
“gamma”: 0.0,
“delta”: 0.0033,
“iv”: 22.6
}
},
“put_options”: {
“instrument_key”: “NSE_FO|41886”,
“market_data”: {
“ltp”: 0.0,
“volume”: 0,
“oi”: 0.0,
“close_price”: 2239.95,
“bid_price”: 1366.15,
“bid_qty”: 1750,
“ask_price”: 1929.1,
“ask_qty”: 1750,
“prev_oi”: 0.0
},
“option_greeks”: {
“vega”: 0.0,
“theta”: 0.0,
“gamma”: 0.0,
“delta”: -1.0,
“iv”: 0.0
}
}
},
{
“expiry”: “2024-03-07”,
“strike_price”: 24150.0,
“underlying_key”: “NSE_INDEX|Nifty 50”,
“underlying_spot_price”: 22378.4,
“call_options”: {
“instrument_key”: “NSE_FO|41887”,
“market_data”: {},
“option_greeks”: {}
},
“put_options”: {
“instrument_key”: “NSE_FO|41900”,
“market_data”: {},
“option_greeks”: {}
}
}
Here “market_data”, “option_greeks” does not have inner keys when all values are 0.
This API was returning blank yesterday i.e. 03-04-2024. But today inner keys are showing.
It should have all the keys with zero(0) values at least. Please add all the available keys in response so that our script do not breaks.