0

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,

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.