Error while placing oco order

kite.place_gtt(kite.GTT_TYPE_OCO, 'YESBANK', 'NSE', [13,17],15,[{"order_type": "LIMIT","product": "NRML","transaction_type":"BUY","quantity":"1","price":"13"},{"order_type": "LIMIT","product": "NRML","transaction_type":"BUY","quantity":"1","price":"17"}])

While placing the order 13 is considered as the target instead of stop loss and similar 17 is regarded as stop loss instead of target.
    SRIJAN edited April 2022
    If you are using BUY OCO,that means you must be on short side. So,naturally,your stoploss would be 17 and target will be 13.

    If you want stoploss as 13 ,and target at 17 ,you have to use sell OCO. And,of course,you must be long on the instrument.

    And,you should learn basic stock market before algo trading. NRML on equity, seriously??
    SRIJAN edited April 2022
    Also,I have a a doubt, @sujith Sir , @rakeshr Sir:

    How is the above gtt order being accepted?? The product is NRML,on equity. Shouldn't it be rejected? What will happen when the gtt will be triggered? This is happening only for gtt orders,normal orders did throw exception.
Sign In or Register to comment.