Sorry for posting here, but it's the only section I'm allowed to.
When working with MtGox market depth I get some positions with negative amount.
How is that possible?
My initilization protocol is the following:
1. I start listening for incoming messages via SocketIO.
2. I buffer all messages and I wait for about 2 minutes, after that I have a collection of buffered messages.
3. I download market depth from
https://mtgox.com/api/1/BTCUSD/fulldepth and I process it.
4. After that I process all the messages from step 2 comparing the timestamp for position. If the timestamp from step 2 message is lower than the one from step 3 I just ignore the message.
Anyway, after doing the initialization I still having some positions with negative amount.
For example I see the following log:
194214,452|ERROR|com.xand.bt.market.MarketStore:66|Level (ASK) for price 1271752 has negative volume!!!So, I go to my market log and see what happened to price 1271752 on ASK leg.
I see that on step 2 I received the following message:
[marketLabel=MTGOX; direction=ASK; price=1271752; volume=-5956000; time=29/07/2012 19:40:44,391]But I didn't receive that position when on step 3.
Ho is that possible?