Shoonya-Dev / ShoonyaApi-py

144 stars 133 forks source link

Delay in feed. Also can you provide 'ft' in milliseconds instead of seconds? Because constructing OLHC data using 'ft' form data feed giving slightly different values. #91

Closed JagdishKolhe closed 5 months ago

JagdishKolhe commented 1 year ago

1) I found that there is a delay of around 10 seconds while getting feed data. Please see the logs given below. eg. look for the feed time (Internet/Local machine timestamp: 1673598343.6566086) in the following log trail, where 'ft' do not match with internet time, whereas it matches for other occurrences. 2) When I construct 1min OLHC data using 'ft' parameter, I found descriptives in candles formed at my machine vs data received from get_time_series API

Look for the attachment for logs. shoonya-feed.log

I raised a similar ticket (https://github.com/Shoonya-Dev/ShoonyaApi-py/issues/81), in the past, there was no reply to the ticket almost for a month. later Shoonya dev team asked to produce logs/evidence for the occurrence. I could not reply to the ticket for 2-3 days and the ticket was closed. Do you mean that a delay of one month from you is acceptable but a delay of 2-3 days from the customer side is not acceptable?

Well, I understand that 'ft' is exchange_time, but still, I get a 'small' variation in OLHC data formed using this 'ft' parameter. There could be one reason behind this, ft time is in seconds, so if some changes like oi/ltp happen in the last and first second is rounded to either the next second or the previous second, Hence this data gets adjusted with the last minute or next minute of 1min candle So can you please send 'ft' parameter with milliseconds?

I explored another broker API eg Angelone, they provide data in milliseconds and OLHC candles formed using their feed match with the historical API given by them. guess what, this OLHC data somewhat matches with what shoonya's get_time_series() gives. So clearly some minor issue is there with 'ft' parameter of shoonya

Shoonya-Dev commented 5 months ago

Greetings from Shoonya!

As we checked, there is no delay in OHLC, and the timestamp is accurate as per internet time, so please check again or refer to the below-attached output.

image