OTO Stop Loss Orders, What am I missing

I’m using python and I’m trying to submit a stop loss order, my understanding is that when the stop loss price is hit, then a new order is initiated. But, the stop loss is getting triggered immediately. Here is an example I have been trying in paper money:

When running the below code, SPY price was at 220.15
api.submit_order(
symbol=‘SPY’,
side=‘buy’,
type=‘market’,
qty=‘20’,
time_in_force=‘day’,
order_class=‘oto’,
stop_loss=dict(
stop_price=‘218.5’
)
)

After running the above code a market order was triggered immediately at 220.15, then a market sell was immediately triggered at 220.16. But, I thought it would wait until the price for SPY dropped to 218.15 before triggering the sell order.

What am I missing?

Thanks for the report, we are looking into it.

Great! Thanks! Let me know if you need anything more.

1 Like

As of now, we put the fix so and I expect it to be working as expected, but please let us know if not.

Fantastic! Will do. Thx!!

It now works for me, thanks!