Stop loss code in Python

rksingh
Friends,
Has anyone using STOPLOSS code in python. If yes, please share. I tried but my order was getting executed at market price each time. Say I am placing buy order for security at 100 and want 5 points stoploss
1) If I use STOPLOSS in same pace_order, will I get 2 order ID's (one for executed buy order and other for stoploss order)?
2) Please share STOPLOSS code which can be executed seperately i.e. not along BUY order. This is because, I want to use order id in future
  • venun
    venun edited December 2017
    try:
    order_id = kite.order_place(tradingsymbol=,
    exchange="NSE",
    transaction_type="BUY",
    quantity=1,
    order_type="SL-M",
    trigger_price=,
    product="MIS")
    print("BUY SL Order placed. ID is", order_id)
    except Exception as e:
    print("Order placement failed", e.message)
  • rksingh
    Thanks Venum..I was giving order_type as normal. Thank You
This discussion has been closed.