Search scrips API gives result differently when data is available and when data is not available:
For BANKNIFTY20APR23C4100:
SearchScrip output was:
{‘status’: ‘Success’, ‘values’: [{‘exchange’: ‘NFO’, ‘tradingSymbol’: ‘BANKNIFTY20APR23C41000’, ‘token’: ‘52782’, ‘instrumentName’: ‘OPTIDX’, ‘pricePrecision’: ‘2’, ‘lotSize’: ‘25’, ‘tickSize’: ‘0.05’}]}
For FINNIFTY18APR23C600:
{‘status’: ‘Success’, ‘data’: []}
Either it should return status as Failure or ‘values’ should be empty.
If it has the ‘data’ as key and there is no ‘values’ key in the response, how will we retrieve the list?