<p>Yes, when you place <strong>market order</strong> it works exactly like you described. </p>

<p>In case you want to get a fixed pre-defined return, you need to place <strong>limit order</strong> </p>

CC BY-SA 4.0
2018-08-16T22:36:02.353Z
2018-08-16T22:36:02.353Z
Chertovsky
<p>new to bitcoin and trading,</p>

<p>I'm writing some code to analyse cryptocurrency markets and I want to better understand market depth.</p>

<p>For a dummy scenario:</p>

<p>Lets say BTC was at $100 and I have 10 that I want to sell. When I place a market order do I 'consume' the highest 10BTC-worth of bids? Such that my average ask is the weighted average of all coins I just sold?</p>

<p>E.g. if the bids were 5BTC at $100 and 5 at $101, when I place by 10BTC ask, I fill those 10 bids and my return is <code>(5 * $100) + (5 * $101)</code> with an average of $100.50 for each BTC I sold?</p>

<p>Obviously in reality there are any number of bids/asks at all sorts of volumes, but the concept is the same?</p>

<p>I've read about interpreting the order-book but I'm looking for an explicit example of what happens when you bid/ask on a given market.</p>

<p>Thanks,</p>

<trading><market><exchange-order><market-depth>
Calculating the average bid/ask price when placing orders
rh1990
# Calculating the average bid/ask price when placing orders

(Asked by: username_0 on 2018-01-09)

new to bitcoin and trading,

I'm writing some code to analyse cryptocurrency markets and I want to better understand market depth.

For a dummy scenario:

Lets say BTC was at $100 and I have 10 that I want to sell. When I place a market order do I 'consume' the highest 10BTC-worth of bids? Such that my average ask is the weighted average of all coins I just sold?

E.g. if the bids were 5BTC at $100 and 5 at $101, when I place by 10BTC ask, I fill those 10 bids and my return is `(5 * $100) + (5 * $101)` with an average of $100.50 for each BTC I sold?

Obviously in reality there are any number of bids/asks at all sorts of volumes, but the concept is the same?

I've read about interpreting the order-book but I'm looking for an explicit example of what happens when you bid/ask on a given market.

Thanks,

**Tags:** trading, market, exchange-order, market-depth


---

## 1 answers

### Answer by username_1 on 2018-08-16. Score: 0

Yes, when you place **market order** it works exactly like you described.

In case you want to get a fixed pre-defined return, you need to place **limit order**


---

