I am consistently receiving a 400 Bad Request error when trying to fetch historical data for expired options contracts. I can successfully fetch the list of expired instruments, but the subsequent call for candle data fails.
Here is an example of the failing request URL: https://api.upstox.com/v2/expired-instruments/historical-candle/NSE_FO%7C40346%7C05-06-2025/60minute/2025-06-05/2025-06-05
Can someone let me know why this request is being rejected? Is there an issue with the instrument key format, the date range, or my account permissions?