I have a Python script that I’m testing in a paper trading account and am having issues implementing part of the sell strategy. Basically, I’m trying to replace existing limit sell orders with a market sell order. How can I implement this? Thanks!
Canceling the limit order and creating a new market sell order does not work due to the delay in canceling the existing limit order. Also, I wasn’t able to find anything in the documentation or the forum to help with this issue.
@hsood If you want to turn a limit order into a market order simply replace the limit price with a ‘marketable’ price. It will then be submitted as a market order (with the added benefit of a limit price).
Set the limit price to less than the current bid for a sell order or greater than the current ask for a buy order. You can be rather generous with how much above or below the quote you set the limit at. I usually set it at 1%. It’s just a backstop. The order will fill like a market order at the current quote.