Stop loss not working

I’m trying to place a BUY order with a stop_loss and take_profit limit :
req = MarketOrderRequest(
symbol=symbol,
qty=get_qty(symbol, budget),
side=OrderSide.BUY,
time_in_force=TimeInForce.DAY,
order_class=OrderClass.BRACKET,
stop_loss=StopLossRequest(stop_price=148.81),
take_profit=TakeProfitRequest(limit_price=152.87)
)
the order gets created, together with the take_profit limit order ‘limit @ $152.87’ … but the stop_loss always comes out as ‘Stop @ -’ … looking at the logs I see stop_loss is ‘None’ in the order debug output even though i set it …
any idea what I’m doing wrong?

Are you sure you don’t get the stop loss at all? From your dashboard if you see both legs of the order and click on the specific stop loss leg (scroll all the way to the right in that table of orders and click expand on stop loss), on that screen that opens up are you truly not seeing a value for the stop loss?

Try using “oto” as orderclass, e.g. this worked for me:

                order_data = LimitOrderRequest(
                    symbol=ticker,
                    qty=qty,
                    side=OrderSide.BUY,
                    limit_price=limitprice,
                    time_in_force=TimeInForce.DAY,                        
                    order_class="oto",
                    take_profit = {'limit_price': targetPrice}
                    stop_loss={'stop_price': stopprice}                      
                )

thanks yes that was it, there does seem to be a glitch in the UI where it displays 'Stop @ - ’ … but i can see the value in another column (that I had switched off)

Sweet, glad it was just the UI bug.