Unable to place SL order - could not define stoploss buy/orders orders

bullish_trader
Hi All,

Using Python Client to work on the orders, able to place the order but when I try to create a SL order for an existing order, get the following error.

INFO:root:Trigger price for stoploss buy orders should be higher than the last traded price (382.20). Use limit order to buy at a lower price. [Read more.](https://support.zerodha.com/category/trading-and-markets/margin-leverage-and-product-and-order-types/articles/what-are-stop-loss-orders-and-how-to-use-them)

Current Open Position is WIPRO (BUY), so for the SL order should be "stoploss sell orders", but looking at the error reason, stoploss buy orders is being attempted by default, that is why error of higher than last traded price should be made.

I don't see an option to specify stop loss buy/sell order, assuming it will be auto chosen based on our order. Some other forum threads mentioned it could be one-off issue but I've tried for last 3 days.

following is my modify_order code,

order_id = kite.modify_order(order_id='xxxxxxxxxxxxxx',
trigger_price=370,
quantity=1,
variety=kite.VARIETY_REGULAR,
order_type=kite.ORDER_TYPE_SLM,
validity=kite.VALIDITY_DAY
)

Any recommendations please?
  • sujith
    Nothing is auto chosen, Positions and orderbook have no relation. You need to specify the transaction type for every order you place.
Sign In or Register to comment.