Rogue historic OHLCV data for BTC?


#1

OHLCV pricing data for BTC shows some spurious data in contrast to the main exchanges by market volume, making your candlestick data unreliable and unusable. This is the corresponding chart rendered from your data.

This example show’s the daily low on 9th September 2018 as $267.18 for example.

{
“timestamp”: “2018-09-19T00:00:00Z”,
“low”: “267.18793”,
“open”: “6335.11777”,
“close”: “6390.84180”,
“high”: “6706.30218”,
“volume”: “1218198398”
},

https://api.nomics.com/v1/candles?key=2018-09-demo-dont-deploy-b69315e440beb145&interval=1d&currency=BTC&start=2018-09-14T00%3A00%3A00Z&end=2018-09-29T00%3A00%3A00Z


#3

Hi James,

Thanks for the report. We are aware of the issue and we’re working on a fix. Here’s some more information about why this is happening:

When we build our aggregated candles, we merge data from every market involving the requested currency (in this case, BTC). When we perform the merge, we use a volume weighted average for open and close, but for high and low, we use the highest high and lowest low.

In general, this results in very long wicks on the candles, and we are working on switching to a volume weighted high and low.

However, in this case the extreme low is caused by a particular trade on one exchange that was an outlier. Often these trades are the result of very thin books creating large price swings when a large order comes through, or when there are users intentionally attempting to manipulate the price by trading against themselves at an extremely high or low price.

We are working on addressing this situation as well, by building in outlier detection to our candle algorithms. We’re taking the time to get it just right, because we want to manipulate the data as little as possible, and only remove extreme outliers.

-Nick Gauthier
CTO @ Nomics


#4

In addition to what @nrg said, I should also mention that our exchange candles for Coinbase Pro match what you illustrated on Twitter:

See this call:

https://api.nomics.com/v1/exchange_candles?key=2018-09-demo-dont-deploy-b69315e440beb145&interval=1d&exchange=gdax&market=BTC-USD&start=2018-09-01T00%3A00%3A00Z&end=2019-01-19T00%3A00%3A00Z

In the short term, you may want to consider aggregating exchange candles from exchanges you trust.


#5

Thanks for the considered and thorough response, I guessed it was outliers on an illiquid marketplace. My use-case is more to provide on-demand charts for a given market without defining an exchange, so I might have to make multiple calls to a) establish the highest volume exchange for the requested pair and b) call up the OHLCV feed - it’s not elegant as such, and I’m trying to be considerate with the API calls, but this should work.


#6

No need to be considerate about making API calls. We cache the hell out of our endpoints and there are no rate limits. Just don’t DDOS us :slight_smile: ; please make all the calls you need to accomplish your goals.