Frequency of MtGox market orders

0

Im currently trying to estimate the frequency of incoming market orders to MtGox order book. Assume the following buy limit orders:

BID 2@150

BID 3@149

against which ONE market order to sell 5 btc is submitted. The transactions would be recorded for instance as:

Trade_ID Unix_date Price Amount Type Properties

1 123456789 150 2 sell market

2 123456789 149 3 sell market

The key problem is that despite there was just one incoming order, it is recorded in two rows because it was matched against two outstanding limir orders.

Possible solutions:

1) If both trades have same TRADE_ID, it is possible to group the transactions. Does it really work that way? Do trades resulting from one order but matched against more orders same Trade_ID?

2) Grouping according to unix time stamp. I assume that these two transactions would have same time stamp? If yes, is is possible that any other market order arrives just at the same microsecond as the one above? Or is the microsecond so small time interval that it is not possible for two orders to have same unix time stamp?

Steef Gregor

Posted 2013-09-04T18:34:55.557

Reputation: 76

just look at the websockets depth event. All new orders will be positive and executed orders will have negative volume. Orders will not appear redundantlyLoourr 2013-09-04T19:25:54.467

I'm afraid I don't understand. Can you elaborate a bit, please?Steef Gregor 2013-09-04T19:54:19.707

How does websocket depth event look like? Can you give an exaample? thanks.Steef Gregor 2013-09-04T19:56:42.183

here is the api that details how to use websockets and you can also get the data from bitcoin charts

Loourr 2013-09-04T23:07:46.663

Well, I went through the API specs, namely the depth channel. However, it contains only following information: currency, item, price, total volume, price_int, type, type_str, volume, volume_int. But it does not contain the information whether the order was limit order or market order. How can you know then what type of order it was?Steef Gregor 2013-09-06T13:19:11.283

Well I guess it's impossible to know for certain (as far as I can tell) but I think it would be a safe assumption to make that if the the price of the depth event is equal to the inside price (or within depth - inside_price * order_volume) and it was immediately executed on (< 1 sec) then that is probably a market order.Loourr 2013-09-06T15:47:57.453

OK, sounds like a reasonable assumption. So i guess the depth update of the market order above would be something like -5BTC, price 149??Steef Gregor 2013-09-06T17:12:30.383

yeah, it was being executed, but you should also look for non negative ones going up in a close time frameLoourr 2013-09-06T17:16:43.417

OK, sounds like a reasonable assumption. So i guess the depth update of the market order above would be something like -5BTC, price 149?? I understand that if the price is lower/higher (depends whether buying order or selling order) than the best bid/ask*order volume then it shoul be an market order. But how do you know how lond did it take to execute that order? DOes it have two times? Time of entry and time of execution? And what about the canceled orders? I guess they have negative volume as well. Maybe it will be youseful, if you can say how the log of order above would look like.Thanks!Steef Gregor 2013-09-06T17:22:55.457

No answers