which type of order to place

vaishali
Hi,
I had a python script, which place Buy order by reading Ask price and place Sell order by reading Bid price at defined logic. I am using -
order_type=kite.ORDER_TYPE_SLM
trigger_price=ask_price / bid_price
product=kite.PRODUCT_NRML
variety=kite.VARIETY_REGULAR

but many times it fetches error: "kiteconnect.exceptions.InputException: Trigger price for stoploss sell orders should be lower than the last traded price (1731.05)."
Please help me know, which order type should I use to buy on Ask price and sell on Bid price?
  • prat
    prat edited June 2020
    The error means the trigger price has already crossed.you need to catch the Exception and retry with limit order "ORDER_TYPE_LIMIT"
  • rakeshr
    @vaishali
    Maybe this article can help to understand SL trigger_price.
Sign In or Register to comment.