Cover Order

deepakksharma00079
Hello sir,
I am able to place cover order but it's rejected due to stoploss beyond 10%. i use this code:
Cmp = 281.35
Stoploss = int ( cmp / 100)
def placeCoverOrder(symbol,buy_sell,quantity,price,stoploss):
# Place an intraday market CO on NSE
if buy_sell == "buy":
t_type=kite.TRANSACTION_TYPE_BUY
elif buy_sell == "sell":
t_type=kite.TRANSACTION_TYPE_SELL
kite.place_order(tradingsymbol=symbol,
exchange=kite.EXCHANGE_NSE,
transaction_type=t_type,
quantity=quantity,
order_type=kite.ORDER_TYPE_MARKET ,
product=kite.PRODUCT_MIS,
variety=kite.VARIETY_CO,
trigger_price=Cmp,
stoploss=Stoploss)

placeCoverOrder('SBIN', 'sell', 1, 'Cmp', 'Stoploss')

I have also tried kite.ltp function for cmp but it's showing the same that SL is beyond 10%. Please solve my problem
  • sujith
    Can you paste the complete debug logs with the params you are sending? You can enable debug logs while initializing Kite Connect.
    Don't use the variables and formula as mentioned above.
  • rakeshr
    Also, you only need to send trigger_price not stoploss value.Check all CO params here. Also, trigger_price should be lower than current LTP(CMP). This thread will help to understand more on this.
Sign In or Register to comment.