I test agian, yes, you are right. C will buy from B
I should make it more clear:
1. short 1000 usd with price 100usd/bts
2. short 1000 usd with price 100.1usd/bts
3. short 1000 usd with price 100.2 usd/bts
10. short 1000 usd with price 100.9 usd/bts
If someone want to buy 10000 usd, how should he give the order?
For the algorithm now, he had to give 10 orders with price 100, 100.1, 100.2, 100.3 ......
It's not good
no, according to the existing market order matching algorithm, C will buy 1000 usd from B with price 1 usd/bts.
btw, why C place the order with the price 1 usd/bts if market has already offerred price 100 usd/bts