Inconsistency in historical data and API requirements for running 2 codes simultaneously

I use dhan Api.

  1. The historical data for 5 minute time frame gives 225 candles, if the code is being run after market, while running it during market hours it gives 187 candles, sometimes 171 and 168 candles. And today it just gave 150 candles. Why so ? Can we rectify this ?
  2. I want to simultaneously run an intraday scanner and a separate code for trade execution and management. To run them together, will I have to buy another API subscription? Because I tried to run them with different tokens generated from same account but there was issue of API limits being breached. ( both codes require Data requests )

Hello @akash_arora

Welcome to MadeForTrade community!

On the first one, can you confirm if you are fetching the 5 min data for the current day or for any previous days? It will be helpful if you can share the timestamp along with request, would help us assist you better.

On the second one, no. The rate limits are not on a subscription level but rather on a user level. If you are running two programs, you can always use a common service which makes the API calls for data and throttles request.