Second time one of my clients faced this problem so I decided to discuss it and maybe there is a better solution to it.

Basically, in live trading, when we send an order to brokerage, LEAN first fetches some information from the brokerage for the symbol to make sure that order is valid and it shouldn't be rejected. On InteractiveBrokers this creates a delay of more than 1 second before order is actually sent to brokerage, and for market orders this can create quite a bit of additional slippage.

I've made a workaround for this by sending market-on-close orders that I then cancel, but this solution is ugly, it pollutes orders list (that is hard to navigate already, can you please add filters?) and for other instruments market-on-close orders may not be available and you will have to use limit orders, which is even less reliable and more ugly.

Maybe there is a better way to fetch that information from the brokerage before sending orders? If not, please add it.