I am getting this issue while querying data for futures token
{'instrument_token': 11925250, 'tradingsymbol': 'ITC19JULFUT', 'segment': 'NFO-FUT'} 2018-01-17 00:00:00 2018-03-08 00:00:00 5minute True Couldn't retrieve data Couldn't parse the JSON response received from the server: b"
504 Gateway Time-out
\nThe server didn't respond in time.\n\n"
other errors for different tokens querying data from [2018-04-27 00:00:00] [2018-06-16 00:00:00], instrument [{'instrument_token': 11924738, 'tradingsymbol': 'INFY19JULFUT', 'segment': 'NFO-FUT'}] interval [5minute] Couldn't retrieve data Couldn't parse the JSON response received from the server: b"
504 Gateway Time-out
\nThe server didn't respond in time.\n\n" {'instrument_token': 11924738, 'tradingsymbol': 'INFY19JULFUT', 'segment': 'NFO-FUT'} 2018-04-27 00:00:00 2018-06-16 00:00:00 5minute True
querying data from [2018-01-17 00:00:00] [2018-03-08 00:00:00], instrument [{'instrument_token': 12025346, 'tradingsymbol': 'VEDL19JULFUT', 'segment': 'NFO-FUT'}] interval [5minute] Couldn't retrieve data Couldn't parse the JSON response received from the server: b"
504 Gateway Time-out
\nThe server didn't respond in time.\n\n"
For some reason, the problem is with futures tokens only.
For expired F&O contract, you can only get day candle not intraday candle by requesting
continuous=1
.Check this documentation.Is it possible to get 5-minute candle data also?
For expired F&O contract, we can only get daily candle data...
for live contracts and equity, we can get minute data.