– How does Coinbase / GDAX calculate volume in historical candles?

How does Coinbase/GDAX calculate the “Volume” in candle data?

I’m pulling data from the GDAX API in 2 ways; 1, by requesting candles similar to this endpoint, and 2, by tallying up raw tick data from the GDAX WebSocket.

My problem is that when I try to create candle data from tick data, my volumes are very different than what GDAX reports for the same/similar periods. (See the blue and red outlines below…)

In my hand-made candles (shown below, highlighted red), I’m simply taking the sum of all the BTC transacted during that interval, but the numbers are much higher than what GDAX is reporting in similar periods.

What am I doing wrong?

Here’s the format I’m using to make my candles:
Raw tick data

Volume discrepancy?

While researching this, I found this post saying that Coinbase uses the # of transactions to calculate volume, but I tried that, and the numbers are still way off. I even tried dividing and multiplying the # of transactions with my calculated volume, but they’re still way off.

Source link

Leave a Comment

Your email address will not be published. Required fields are marked *