if response.status_code == 200:
# The API request was successful
data = response.json()
# You can work with ‘data’ which contains the JSON response from the API
print(data)
else:
print(f"Failed to fetch data. Status code: {response.status_code}")
It appears that the contract fetched under the instrument_key NSE_FO|46579, specifically MIDCPNIFTY 7800 CE 16 OCT 23, has already reached its expiration. Notably, there were no trades conducted on this contract as of yesterday, resulting in an empty candles object.
Please inform us if you encounter a similar scenario with other in-the-money contracts. We are happy to assist you with any concerns or inquiries you may have.
The data regarding the expired contracts is currently unavailable. We are in the process of making this information accessible in the future. You will be notified once it becomes available for use.