When BTC is traded at a Bitstamp, Mt Gox (or similar) what is the algorithm for matching Buys to Sells? How do partial fills occur?

7

3

I'm trying to understand how a partial fill would / should happen at an exchange and how that would occur

For example, if the BTC rate was $10/BTC and

  • Someone wanted to buy 100 BTC at $10

The only sellers were

  • One seller wants to sell 50 coins for $10 USD
  • One seller wants to sell 50 coins for $9.90 USD

Question

  1. Would the final transaction not be completed because not enough matching shares were available? (fair benefit)

  2. Would the purchaser be charged $10 * 50 + $9.90 * 50 = $995 (purchaser saves $5)

  3. Would the purchaser be charged $1,000 and the price was increased from $9.90 to $10 (seller gains unexpected $5)

  4. Would the exchange purchase the shares at $9.90 and quickly resell them for $10 (exchange benefit)

  5. If #4 occurs, should the exchange still charge a fee on top of profits already made?

What is expected in this scenario?

To put this in better context, I'm comparing #4 to SEC Rule 605 to encourage open reporting and trade equality. Namely requiring market centers (Mt Gox) to disclose the extent to which they provide executions at prices better than the public quotes to investors using limit orders.

goodguys_activate

Posted 2013-03-06T20:38:53.427

Reputation: 11 898

http://bitcoin.stackexchange.com/questions/9832/will-i-pay-bid-price-or-lowest-necessary-amount/9833#9833 didn't examine this question close enough to say if it's a dupe, but it is worth checking.o0'. 2013-05-22T10:58:40.390

@Lohoris hmm, if they are dupes this question was asked first (and is a better "question" IMHO) .... ;)goodguys_activate 2013-05-22T12:14:37.440

>4 is unethical. So they get to keep the profit for themselves?<Pacerier 2013-08-16T12:40:58.670

@Pacerier Yes, such a manipulation is possible by the "deal matchmaker" who can inflate prices and horde the profits, without letting anyone else know whats happening. It's all anonymous so there is no way to prevent it... unless you have an idea on how to force disclosuregoodguys_activate 2013-08-16T12:56:33.413

related: How do buy and sell orders work?

Murch 2014-10-09T07:20:11.097

Answers

2

(2) is the correct answer, the exchange will match the buy order with the lowest sell orders. This is the case with mtgox. Other exchanges should do the same, however it is up to them, hard to give a general answer here, need to look at each one case by case

(4) is specifically NOT true in case of mtgox because they do not act as counter party to any transaction. Not sure about any other exchange, because they all have their own policies.

Sergey Golovchenko

Posted 2013-03-06T20:38:53.427

Reputation: 287