Poloniex's API - Returned JSON contains more buy's than sell's

317 Views Asked by At

I recently discovered Poloniex's API and am a big fan. I am puzzled about the following thing though: I query one Poloniex's BTC-ETH trade history for a 24h trading period. E.g., https://poloniex.com/public?command=returnTradeHistory&currencyPair=BTC_ETH&start=1489190400&end=1489276799 queries all BTC-ETH trades on March 11, 2017 (UTC). The returned JSON contains 46,675 trades (below the API's max result size of 50k). When counting up all the sell- and buy-trades contained in this JSON, I see that there is a total of 8,814.124270 coins bought vs 7,754.184259 coins sold. How can that be? Shouldn't those two numbers be the same? What am I missing?

Thank you very much in advance.

1

There are 1 best solutions below

0
On

A buy is when someone buys the ask, also known as an uptick. A sell is when someone sells the bid, also known as a downtick.

Everything that is stuck on the book is considered liquidity. Market price buyers and sellers remove liquidity. People who put orders on the book add liquidity.

So no, the buys should not equal the sells as it is totally possible that all that happened one day is that everyone kept hitting the buy button.

Consider this, if the buys equalled the sells, why would you need the data sent twice, and how would you know whether the bid or ask was taken?