user4429: I was wondering about how ASKs and BIDs are matched:
Say I set up two separate trading accounts on mtgox.
On my first account, I offer to sell 1 BTC for 1000 USD
...Nobody will buy it (at current rates) so a sell will not happen.
Now, on my second account I offer to buy 1 BTC at 1000 USD.
I guess everyone will take that offer, and the buy will happen.
But will I get the 1000 USD that my first account is willing to pay (being the highest match), or what will happen?
I have a feeling this is a 'stupid' question, but I have no experience in how trading systems work.

user196: First account gets nothing.
Second account buys them starting from the lowest offer, going up.
Such as, there are sells:

0.30 units @ a price of 100
0.10 @ 150
0.40 @ 650
0.80 @ 850
1.00 @ 1000 (your first offer)

You post a limit order to buy 1.00 unit @ a maximum price of 1000, you get:

0.30 @ 100 (total spent 30)
0.10 @ 150 (total 45)
0.40 @ 650 (total 305)
0.20 @ 850 (total 475)

You got the amount requested (1.00 units), spending 475 instead of 1000 (the maximum you were willing to spend).
The new market depth will be:

0.60 @ 850
1.00 @ 1000 (your first offer)


4429: <p>I was wondering about how ASKs and BIDs are matched:</p>

<p>Say I set up two separate trading accounts on mtgox.</p>

<p>On my first account, I offer to sell 1 BTC for 1000 USD</p>

<p>...Nobody will buy it (at current rates) so a sell will not happen.</p>

<p>Now, on my second account I offer to buy 1 BTC at 1000 USD.</p>

<p>I guess everyone will take that offer, and the buy will happen.</p>

<p>But will I get the 1000 USD that my first account is willing to pay (being the highest match), or what will happen?</p>

<p>I have a feeling this is a 'stupid' question, but I have no experience in how trading systems work.</p>
 196: <p>First account gets nothing.</p>

<p>Second account buys them starting from the lowest offer, going up.</p>

<p>Such as, there are sells:</p>

<ul>
<li>0.30 units @ a price of 100</li>
<li>0.10 @ 150</li>
<li>0.40 @ 650</li>
<li>0.80 @ 850</li>
<li>1.00 @ 1000 (your first offer)</li>
</ul>

<p>You post a limit order to buy 1.00 unit @ a maximum price of 1000, you get:</p>

<ul>
<li>0.30 @ 100 (total spent 30)</li>
<li>0.10 @ 150 (total 45)</li>
<li>0.40 @ 650 (total 305)</li>
<li>0.20 @ 850 (total 475)</li>
</ul>

<p>You got the amount requested (1.00 units), spending 475 instead of 1000 (the maximum you were willing to spend).</p>

<p>The new market depth will be:</p>

<ul>
<li>0.60 @ 850</li>
<li>1.00 @ 1000 (your first offer)</li>
</ul>
