Hi guys,
I was recently looking at the market data feed from Poloniex and found a few weird examples which I couldn't find an explanation for -- would appreciate if anyone could shed some light on this or throw some ideas.
Poloniex send a bunch of messages in each packet with a sequence number attached. The messages in one packet normally refer to one matching event (e.g. a trade, the book updates it causes and potentially the triggered stop-orders, I think). There's three message types: remove, modify (new price points count as modify as well) and trade.
As an example, for buy trades, the packet would look like this:
- trade: buy <rate> <amount>
- trade: buy <rate> <amount>
- trade: buy <rate> <amount>
- remove: ask <rate>
- remove: ask <rate>
- modify: ask <rate> <amount>
However, I found a few cases where's there's two simulatenous buy/sell trades in one event -- I'm trying to understand how could this be possible if the top of the book doesn't even move? If these were different trade events, they would be assigned different sequence number; if this is one event, how come it has both buy and sell legs? Also note the size of the small buy trade is roughly proportional to the size of the big sell trade every time (circa 0.00595%). Here's the data:
type side rate amount
seq timestamp pair
5136384 2016-04-02 19:51:33.768925 BTC_ETH modify bid 0.02763399 20.95993648
BTC_ETH modify ask 0.02763400 0.02002996
BTC_ETH trade sell 0.02763399 0.02003116
BTC_ETH trade buy 0.02763400 0.00000120 // <-- wtf?
5136393 2016-04-02 19:51:35.787860 BTC_ETH modify bid 0.02763399 20.93990412
BTC_ETH modify ask 0.02763400 0.02002876
BTC_ETH trade sell 0.02763399 0.02003236
BTC_ETH trade buy 0.02763400 0.00000120 // <-- wtf?
5136398 2016-04-02 19:51:36.870590 BTC_ETH modify bid 0.02763399 21.93990412
BTC_ETH modify ask 0.02763400 0.01996921
BTC_ETH trade sell 0.02763399 1.00000000
BTC_ETH trade buy 0.02763400 0.00005955 // <-- wtf?
5136410 2016-04-02 19:51:42.086652 BTC_ETH modify bid 0.02763399 19.91993491
BTC_ETH modify ask 0.02763400 0.01996802
BTC_ETH trade sell 0.02763399 0.01996921
BTC_ETH trade buy 0.02763400 0.00000119 // <-- wtf?
TL;DR: can there be both buy and sell trades in one market event if the top of book didn't move?