OrderSendAsync() - is it guaranteed that the commands are processed in the same order they are sent?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Dear friends,
Suppose I have a pending sell limit order for a certain instrument in a stock exchange market.
If I run an OrderSendAsync() command to cancel this order and, shortly thereafter, I run another OrderSendAsync() command to send a market buy order for the same instrument, is it guaranteed that my sell limit order will be canceled before my market buy order is executed?
Is there any chance that the OrderSendAsync() commands are executed out of order and my pending sell limit order is executed by my own market buy order, before being canceled?
What if I use OrderSend() instead of OrderSendAsync() ?