cryptoqween / cryptoqween.github.io

CryptoCompare API tutorials
194 stars 114 forks source link

where to find available timestamps and timestamp limits for a specific coin in the historic paths #26

Closed jcuypers closed 4 years ago

jcuypers commented 6 years ago

Hi,

Wondering if the following behavior is correct and/or where to get this info.

I can't seem to find a way to determine the "valid" range of available historical data.

As stated in the doc, if you require more data, adjust the timestamp to whatever you need (when not providing the info specifically, you will get the most recent info)

So I've made a simple loop, where I download the hourly historical data with a limit of 2000 (this yields 2001 results) and adjust to timestamp to the earliest incoming - 1 hour as the toTs for the next call. My stop condition has been set to any data response which yields less than 2001 responses. (meaning no more extra data available)

To my surprise, the loop continues to run and the call always returns 2001 entries. whatever timestamp provided, it is considered valid, with a 100 status code, and the response are just zeros.

I've cross-validated my script output with a direct call on the API documentation site and the results are the same.

Any insides on how to best solve this? The coin detailed info doesn't a valid range, except for a start data of the the coin and has no link to any listing data of any exchange.

I agree, that the issue could be solved by checking for all zero output, but in my opinion this is a really cumbersome approach.

cryptoqween commented 4 years ago

Hi there, just wanted to let you know that this version of the streaming API is being sunset in the next couple of weeks as we are moving to version 2, that has a lot more features and better support. Please visit our documentation page which provides code examples in javascript, node, python and golang: https://min-api.cryptocompare.com/documentation/websockets.