The orders are executed based on the first come, first serve. If a user has placed an order before you, which is similar to yours, then his/her order will be executed first. And if the quantity and price of the order is matched, then your order will be executed.