0

I am trying to use CryptoCompare to get historical daily OHLC data, but the data I get seems to be wrong. For example, the following query (timestamp=1507248000) will give you data where 'open' (66.43 USD) is less than 'low' (68.88 USD): https://min-api.cryptocompare.com/data/histoday?fsym=MLN&tsym=USD&limit=1&aggregate=1&toTs=1507248000

Am I missing something or is CryptoCompare really unreliable?

1 Answer 1

1

CryptoCompare has been known to sometimes present inaccurate data in US dollars when complex conversions happen.

For instance, if during the date you queried the BTC to some other reference coin price oscillated, the Bitcoin to altcoin price may have had a low price in Satoshis but the Dollar quote to one of the coins (BTC or the reference altcoin) could've been higher at that particular moment. So the Satoshi price could've been the daily low but the Dollar price could've been a bit higher. Note that in late 2017 there were wild intraday USD price oscillations.

The 2nd data item, where you spotted the bug, happened on 10/06/2017 @ 12:00am (UTC) when Bitcoin prices were at around U$ 4324, which doesn't match anywhere close to the quote you got there. So there's some conversion going on indicated by ...

"ConversionType":{"type":"multiply" ...

...in the JSON data, which you didn't specify in your question. That applied conversion and its relation to the US dollar are the keys to fixing the bug in your program.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.