Bracket order squaresoff immediately after execution without waiting for stoploss_limit or squareoff

sunil55tyagi
Today I tried placing many Yesbank BO orders using kite connect,
Surprisingly the orders were squared of as soon as they executed.

product=BO&quantity=1&squareoff_value=2.55&transaction_type=SELL&stoploss_value=5.75&access_token=yyy&trigger_price=&api_key=xxx&price=1278.75&tradingsymbol=YESBANK&exchange=NSE&validity=DAY&order_type=LIMIT&disclosed_quantity=1


the above order executed at 1278.85 and squaredoff at 1278.4

where as orders placed directly from kite were waiting to hit either stop_loss or squareoff_value , but orders placed from kiteconnect were being squared off immediately after order execution.
please resolve.
  • sunil55tyagi
    I raised the ticket also but got very pathetic reply :
    Your reply to support request #523355 has been received. We will get back to you shortly.
    following was their reply :smile:
    " Please note that Bracket Orders are algorithmic orders which are executed based on a logic created in the software. This is just the way the system works for safety on a highly leveraged product."
  • Vivek
    @sunil55tyagi can you pm me your api_key? I will go through orders log.
  • sunil55tyagi
    please provide your email id
  • sunil55tyagi
    @vivek please provide your email id
  • sunil55tyagi
    Today also same thing happened with following orders: product=BO&quantity=1&squareoff_value=1&transaction_type=SELL&stoploss_value=1&access_token=xxx&trigger_price=&api_key=yyy&price=262.6&tradingsymbol=ADANIPORTS&exchange=NSE&validity=DAY&order_type=LIMIT&disclosed_quantity=1 Response Code : 200 {"status": "success", "data": {"order_id": "161007000067580"}} product=BO&quantity=1&squareoff_value=20&transaction_type=SELL&stoploss_value=20&access_token=xxx&trigger_price=&api_key=yyy&price=263&tradingsymbol=ADANIPORTS&exchange=NSE&validity=DAY&order_type=LIMIT&disclosed_quantity=1 Response Code : 200 {"status": "success", "data": {"order_id": "161007000075428"}} Please rectify the problem .
  • Vivek
    @sunil55tyagi Please post your app name and email id you have used to signup for Kite developer console.
  • sunil55tyagi
    sunil55tyagi edited October 2016
    @vivek
    email id : [email protected]
    app name : sunil_kite_connect
  • sunil55tyagi
    product=BO&quantity=1&squareoff_value=20&transaction_type=SELL&stoploss_value=20&access_token=xxx&trigger_price=&api_key=yyy&price=263&tradingsymbol=ADANIPORTS&exchange=NSE&validity=DAY&order_type=LIMIT&disclosed_quantity=1

    Response Code : 200 {"status": "success", "data": {"order_id": "161007000075428"}}
    but order squared off @ 263.05 .
    It should not squaredoff until either of the lmits have hit which I intentinaly placed @20 on each side
  • sunil55tyagi
    It seems system is not taking the squareoff_value and stoploss_value parameters ,
    rather ignoring them.
  • Vivek
    Vivek edited October 2016
    @sunil55tyagi I checked our logs and it seems that you are placing normal order and not BO. You are making POST request to /orders/ which ideally should be /orders/bo for placing BO orders. Please check the documentation here for order placing.
  • sunil55tyagi
    @vivek
    thank you vivek,
    Please tell me one more thing when I get the order status/details
    if the order type BO the response does not contain what were the stoploss_value and squareoff_value ,
    Which I posted along with the order earlier
  • Vivek
    @vivek Those params are ignored and it just took the price and trigger price.
  • nilesh.kute2008
    Hi,

    I too have the same issue, the order gets squared off immediately. I'm passing all values as explained by sunil. but I'm using the python client. I mention product type as BO. am I missing anything else.

    Thanks in advance.

    Nilesh
  • Vivek
    @nilesh.kute2008 Are you posting order to right endpoint for bo? For bo it should be /orders/bo with the required fields.
  • nilesh.kute2008
    Hi Vivek,

    Thanks a lot. that worked. There were 2 arguments which were not passed.
    Variety="bo" and Validity="DAY"

    Once these were passed. it worked perfectly.

    Thanks again.
This discussion has been closed.