<p>(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 <em>should</em> 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</p>

<p>(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.</p>

CC BY-SA 3.0
2013-03-07T20:50:32.263Z
2013-03-07T21:00:56.517Z
2013-03-07T21:00:56.517Z
Sergey Golovchenko
<p>I'm trying to understand how a partial fill would / should happen at an exchange and how that would occur</p>

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

<ul>
<li>Someone wanted to buy 100 BTC at $10 </li>
</ul>

<p>The only sellers were </p>

<ul>
<li>One seller wants to sell 50 coins for $10 USD</li>
<li>One seller wants to sell 50 coins for $9.90 USD</li>
</ul>

<p><strong>Question</strong></p>

<ol>
<li><p>Would the final transaction not be completed because not enough matching shares were available?  (fair benefit)</p></li>
<li><p>Would the purchaser be charged $10 * 50 + $9.90 * 50 = $995  (purchaser saves $5)</p></li>
<li><p>Would the purchaser be charged $1,000 and the price was increased from $9.90 to $10 (seller gains unexpected $5)</p></li>
<li><p>Would the exchange purchase the shares at $9.90 and quickly resell them for $10  (exchange benefit)</p></li>
<li><p>If #4 occurs, should the exchange still charge a fee on top of profits already made?</p></li>
</ol>

<p>What is expected in this scenario?</p>

<p>To put this in better context, I'm comparing #4 to <a href="http://www.sec.gov/investor/pubs/exquality.htm" rel="nofollow">SEC Rule 605</a> 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.</p>

CC BY-SA 3.0
2013-05-22T10:58:40.390Z
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'.
CC BY-SA 3.0
2013-05-22T12:14:37.440Z
@Lohoris hmm, if they are dupes this question was asked first (and is a better "question" IMHO) .... ;)
makerofthings7
CC BY-SA 3.0
2013-08-16T12:40:58.670Z
#4 is unethical. So they get to keep the profit for themselves?
Pacerier
CC BY-SA 3.0
2013-08-16T12:56:33.413Z
@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 disclosure
makerofthings7
CC BY-SA 3.0
2014-10-09T07:20:11.097Z
related: [How do buy and sell orders work?](http://bitcoin.stackexchange.com/a/20759/5406)
Murch
<exchanges><mtgox><exchange-fees>
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?
makerofthings7
# 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?

(Asked by: username_0 on 2013-03-06)

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](http://www.sec.gov/investor/pubs/exquality.htm) 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.

**Tags:** exchanges, mtgox, exchange-fees

> **Comments:**
> **username_1**: 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.  
> **username_0**: @Lohoris hmm, if they are dupes this question was asked first (and is a better "question" IMHO) .... ;)  
> **username_2**: #4 is unethical. So they get to keep the profit for themselves?  
> **username_0**: @username_2 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 disclosure  
> **username_3**: related: [How do buy and sell orders work?](http://bitcoin.stackexchange.com/a/20759/5406)  

---

## 1 answers

### Answer by username_4 on 2013-03-07. Score: 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.


---

