if i put a buy / Sell order with BO, sometimes it was not executed as single order, how can i resolv

dharmaraj81 edited November 2019 in Python client
hi Tech leaders,

sometimes, if i buy/sell 100 shares using python kite api, it will buy as many part like 17, 7, 20, 56 ( totally 100 ),

but i am always use to buy with target and stoploss, but my target set on only one buy/sell ( as first example 17 ), all other trades are executed with stoploss value only,

so it wil make big loss to us, any one can help me to resolve it??

it showing me as bo: self trade rejection

  • sujith
    You are placing the order in such a way that you become the seller and buyer. Hence your order gets rejected. You need to have a significant difference in target and stop-loss values.
  • dharmaraj81
    ok, i wanted to sell than buy, if i sell 100 shares. it wont be sell fully, it will be different different numbers like above, how i can resolve it???
  • dharmaraj81
    dharmaraj81 edited November 2019
    Hey @sujith

    I am getting frustrate about it, pls let me have a way to override this issue

    This is my code

    order_id = kite.place_order(tradingsymbol = ITC,
    price = #Last Minute Close Price#,
    squareoff = 0.3,
    stoploss = 2.5,
    variety = kite.VARIETY_BO

    but above code buy the script like following split up

    so i wanted to override it, 17 qty only place the buy order, all others hanging with trigger price or get rejected

    Pls help me
  • rakeshr
    You can increase square-off value to bit higher,as your pending buy order and squareoff/target price seem to be achieved at the same time making you buyer and seller at the same time/self trading.
  • dharmaraj81
    dharmaraj81 edited November 2019
    Thank you @rakeshr , problem resolved...

    Thanks So much :) :) :) :)
This discussion has been closed.