SLM Rejected

Kamalv
Hi @sujith @rakeshr @kiteconnect , I'm trying to place SLM (if below 501.1 execute with market price) but order placement failed. Could you check and suggest

tradingsymbol=TATAMOTORS&exchange=NSE&transaction_type=SELL&order_type=SL-M&quantity=1&product=MIS&trigger_price=501.1&price=None&disclosed_quantity=0&tag=SL
ERROR:root:SL order placement failed
SL ORDER: order_id: None, order_tm: 2022-01-12 10:46:31.436000, error: Trigger price for stoploss sell orders cannot be below the lower circuit price. Please try placing the order with trigger price above 451.20.
  • Kamalv
    @SRIJAN i swa your response here ( https://kite.trade/forum/discussion/comment/36572/#Comment_36572 ) .

    in my case, placed order at 10:46:39, LTP at 10:46 is around 505 and my trigger_price is 501 and order_type = SELL. meeting all conditions.

    am i missing anything ?
  • SRIJAN
    This shouldn't happen. Paste your full code, then only we can identify the problem.
  • Kamalv
    Kamalv edited January 12
    @SRIJAN i shared the code but looks like it should be approved before displayed.
  • Kamalv
    Kamalv edited January 12
    @SRIJAN
    stock_symbol = 'TATAMOTORS'
    quantity = 1
    trigger_price = 501.1
    order_type = 'SL-M'
    price = None
    transaction_type = 'SELL'
    tag = 'SL'

    sl_id, sl_tm, error = sl_order(api_key, access_token, stock_symbol, trigger_price,
    price, quantity, transaction_type, tag, order_type)


  • SRIJAN
    SRIJAN edited January 12
    The code looks fine. I can't figure out the problem,ask Sujith or Rakesh Sir.
  • Kamalv
    @SRIJAN thanks for quick response. This code used to work fine till yesterday.

    @sujith @rakeshr plz help me by taking this as priority, my system failing because of this, causing critical issues.

  • SRIJAN
    SRIJAN edited January 12
    Never mind,i was thinking something else,what I said was wrong. :D
  • Kamalv
    @SRIJAN order_type is a default paramater with "SL" (if don't pass any it considers "SL", since i'm passing "SL-M" it should consider "SL-M").
  • SRIJAN
    SRIJAN edited January 12
    Yes, :D ,I told na, I was trying to figure out the solution and wrote this,then I realised I messed up. :#
  • Kamalv
    agreed @SRIJAN . Shall we seek senior help to figure out and fix this issue?
  • SRIJAN
    Yes,wait for Rakesh Sir or Sujith Sir response.
  • Kamalv
    @sujith @rakeshr di you get any chance to look into?
  • rakeshr
    rakeshr edited January 13
    @Kamalv
    Can you remove this price=None field or send it with price=0 instead of None only for SL-M order(as it requires only trigger_price field)?
  • Kamalv
    @rakeshr I tried without "price" field (passing only trigger price) but still same error.
  • rakeshr
    Please paste the complete order param along with the error message. It's working fine for us with correct trigger_price.
  • Kamalv
    Kamalv edited January 13
    @rakeshr please find payload and error message:

    payload:
    tradingsymbol=LT&exchange=NSE&transaction_type=SELL&order_type=SL-M&quantity=1&product=MIS&trigger_price=1979.25&disclosed_quantity=0&tag=SL-M

    Error message:
    SL-M ORDER: order_tm: 2022-01-13 12:07:31.638276, error: Trigger price for stoploss sell orders cannot be below the lower circuit price. Please try placing the order with trigger price above 1776.80.
  • rakeshr
    No, I was not able to reproduce the error with the given order_param. The order went fine. Until you are sending any other param with None, above error shouldn't happen.
  • rakeshr
    This is fixed. If you send any of the order params with None, you will get the required input exception message highlighting the expected input type.
    {
    "status": "error",
    "message": "Invalid request (failed to decode `price`, got: `None` (expected decimal))",
    "data": null,
    "error_type": "InputException"
    }
This discussion has been closed.