Quote from mikesmithv:
It's just another state that needs to be handled. It forces you to think about how long do you want to wait for a short to be located? After you cancel how long do you wait for an acknowlegement back? Maybe never (the Internet went down, whatever). I thought it was pretty silly have a handler for a timeout on a market order since they ALWAYS execute instantly but then one day there was a delayed open due to news and I was glad that handler was there.
Maybe I should phrase this better. I'm trying to get a very specific answer to a very specific scenario -- i..e, the scenario I wrote in the thread earlier.
In the above scenario I posted in a previous message, say I cancel my order once I detect it's in presubmit-locate.
Should my internal accounting treat this order as an order that can be executed, given the fact that it's possible for me to send a cancel but for IB to have an Ack AND a Fill message in flight on the wire? <-- Key question.
More descriptive:
1) I send my cancel on my order in locate state, this message is going through the internet to IB. I have a shitty connection, so this order goes through China, then Iceland, then back through Los Angeles, through Detroit, and finally IB's server. (It's slow.)
2) IB, on its servers, finds a locate. It sends me a submit AND it puts my order out on the market. As soon as it puts my order into the market, the market cuts through my level and fills my order, sending IB a fill message (who then forwards that notification on to me).
At this point in time, the "Submit" is already in flight and the "Fill" is in flight afterwards. Now, my cancel-order from (1) finally hits IB's server.
3) IB sees that my order was already filled, so it rejects the cancel. Sends me another notification.
So, for all intents of purposes, should I consider a notification that my order is in a 'locate' state as just another form of "Submitted", but more informational?
I hope this makes sense.
Thanks for your help, btw.