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?

  • just look at the websockets depth event. All new orders will be positive and executed orders will have negative volume. Orders will not appear redundantly – Loourr Sep 4 '13 at 19:25
  • I'm afraid I don't understand. Can you elaborate a bit, please? – Steef Gregor Sep 4 '13 at 19:54
  • How does websocket depth event look like? Can you give an exaample? thanks. – Steef Gregor Sep 4 '13 at 19:56
  • here is the api that details how to use websockets and you can also get the data from bitcoin charts – Loourr Sep 4 '13 at 23:07
  • 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 Sep 6 '13 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.