Today while accessing the historical data via the .NET component for Kites; I got the following exception:
The operation has timed out. at KiteConnect.Kite.Request(String Route, String Method, Dictionary`2 Params) at KiteConnect.Kite.GetHistoricalData(String InstrumentToken, DateTime FromDate, DateTime ToDate, String Interval, Boolean Continuous) at Trader.Infrastructure.Jobs.ShortlistingJob.GetStocks() in C:\Apps\Trader\Trader.Infrastructure\Jobs\ShortlistingJob.cs:line 34 at Trader.Infrastructure.Jobs.ShortlistingJob.<>c.b__0_0() in C:\Apps\Trader\Trader.Infrastructure\Jobs\ShortlistingJob.cs:line 18 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()
Also, while going through my logs; found this additional exception (Request failed): Parameters: refire = False, unscheduleFiringTrigger = False, unscheduleAllTriggers = False Quartz.JobExecutionException: Job threw an unhandled exception. ---> Quartz.SchedulerException: Job threw an unhandled exception. ---> KiteConnect.NetworkException: Request failed (kitetrade-common). at KiteConnect.Kite.Request(String Route, String Method, Dictionary`2 Params) at KiteConnect.Kite.GetHistoricalData(String InstrumentToken, DateTime FromDate, DateTime ToDate, String Interval, Boolean Continuous) ......
Can someone please have a look into this? Note: I'm calling GetHistoricalData() in a loop; which might have run for 50+ iterations. Just want to check if there is any throttling in place for the said endpoint; if yes, whats the workaround?
Check out this thread for rate limit details. To avoid rate limits you should add delays in between calls. Also make sure to handle all kinds of exception for every call.
Hello Kite Team, Do you have a permanent solution for this intermittent problem ?