hczhu / TickerTick-API

TickerTick API: stock news API
MIT License
80 stars 6 forks source link

time values seems to be in accurate #2

Closed shehan011 closed 3 years ago

shehan011 commented 3 years ago

I have checked with several articles that the epoch time returned with an API call does not match with its article published time (which is produced with the article when I visit the url). Any reason for that ?

Mito9999 commented 3 years ago

Are you making more than 6 requests per minute?

shehan011 commented 3 years ago

No not at all. atm I am just going through the data to see how reliable and accurate they are and found that the two timestamps does not match.

shehan011 commented 3 years ago

check this out { "id": "2797609833636286060", "title": "News Corp : and Facebook Reach Agreement in Australia", "url": "https://www.marketscreener.com/quote/stock/NEWS-CORPORATION-13439787/news/News-Corp-nbsp-and-Facebook-Reach-Agreement-in-Australia-32691106/?utm_medium=RSS\u0026utm_content=20210315", "site": "marketscreener.com", "time": 1615842399000, "favicon_url": "https://tickertick.com/website_icons/marketscreener.com.ico", "tags": [ "fb" ] }, the time here is 1615842399 but when i visit the url and get the utc epoch it is 1615842060 there is a difference of approx 339

shehan011 commented 3 years ago

this is another one { "id": "-1032509889829059691", "title": "Alibaba Vs. Amazon Stock: Which Is The Better Buy | $FB $WMT $AMZN $BABA $BABAF", "url": "https://seekingalpha.com/article/4413411-alibaba-vs-amazon-stock-which-is-better-buy-?source=feed_tag_editors_picks", "site": "seekingalpha.com", "time": 1615570260000, "favicon_url": "https://tickertick.com/website_icons/seekingalpha.com.ico", "tags": [ "fb" ] }, epoch returned with the api call is 1615570260 but when i visit the url and get the utc epoch it is 1615541460 (ET time converted to utc without daylight saving)

shehan011 commented 3 years ago

Mito9999 any clue on how to resolve my issue ?

hczhu commented 3 years ago

@shehan011 It's a known issue that some story timestamps are not accurate. A timestamp can be off up to one day for a lot of stories. A small portion of stories may have a timestamp off dozens of days. Therefore, I'd suggest using the timestamp on the granularity of days. The root cause of this issue is a trade-off for less backend resource usage.

I'm curious for your use case. Do you need a highly precise publish timestamp for any article.

hczhu commented 3 years ago

Are you making more than 6 requests per minute?

This inaccurate timestamp issue is irrelevant to the request rate limit.

hczhu commented 3 years ago

I fixed a bug which was causing the timestamp off by a few hours. @shehan011 I should've paid closer attention.