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:
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.
sum(size)
of trades in an interval should be the volume but that just does not match the GDAX api. I have tested other exchanges and they are fine. so I take my calculated value as correct.