Inconsistent Data

Hi , i am fetching data on 5min timeframe at 10:30:05 , which means 10 am 30 minutes and 5 seconds , so if i am running this every 5 min (10:35:05 , 10:40:05…) , sometimes latest candle include 5 sec candle data , and sometimes it includes previous full 5 min candle , why there is such issues

Hi @yogya.9olw812n ,

Kindly let us know which API version you are using

i am currently using v2 api and using history fn to get data

Hi @yogya.9olw812n,

Kindly upgrade to V3

ok i will upgrade , and what outcome should i expect as per my condition ? should it include data of 5sec candle or not?? , and also it is working fine before v3 , if you guys do upgrade overnight our whole algo stop working , what type of customer service is this?

Hi @yogya.9olw812n
You will get the 2 candle data in this condition.

do u know for now , how can i get consistent data in v2 api , i want latest 5 min candle data , as soon as candle closes

Hi @yogya.9olw812n

I can tell you my personal logic which I used personally in APIV2. I hit the API after 20 second then for sure I will get 2 candle data.
I store both candle data in list then pop the last element from the list
So like this you removed the unwanted candle data which we don’t want and you have the data which you want.

Hope it will help and let me know if you have any doubt or any better idea than this. I would love to know

Thanks