Got error "BO: Square off and SL ticks can not be zero" even when both is passed.

Shaha
Today, for one of my orders I got below error:
"BO: Square off and SL ticks can not be zero"
But i passed SL as well as Target, just like other orders. Can you please check why it got rejected?

I have checked my logs as well as Signals backup file.
Both clears that
SL passed is :6.05
Target passed is : 18.15
Quantity: 276
"09:21:00 Placing order: IRB 3920129 SELL 253.95 6.05 18.15 276"

Below is the order details:

average_price 0
cancelled_quantity 0
disclosed_quantity 0
exchange NSE
exchange_order_id
exchange_timestamp
filled_quantity 0
guid
instrument_token 3920129
market_protection 0
order_id 180115000125185
order_timestamp 43115.38963
order_type LIMIT
parent_order_id
pending_quantity 0
price 253.95
product BO
quantity 276
status REJECTED
status_message BO: Square off and SL ticks can not be zero
tag NO
tradingsymbol IRB
transaction_type SELL
trigger_price 0
validity DAY
variety bo
pnl 0

Tagged:
  • Shaha
    Guys again today 2 orders were rejected with same error..

    Below are the order IDs:
    180116000121747
    180116000123992

    And below are my log extracts:


    For TCS:
    09:21:00 Placing order: TCS 2953217 BUY 2777.65 27.1 81.3 6

    For HINDZINC:
    09:21:11 Placing order: HINDZINC 364545 BUY 327.85 5.0 15.0 53

  • sujith
    Hi @Shaha,
    Is this happening from yesterday or you had faced it earlier?
    Can you let us know if there is some kind of pattern?

    We have asked OMS team to look into this.
  • Shaha
    Earlier occurances:

    order_timestamp
    18-12-2017 09:28
    18-12-2017 09:28
    18-12-2017 09:28
    09-01-2018 09:24
    09-01-2018 09:24
    15-01-2018 09:21

    Rest of the details in the image attached:


    The SL and Target values are not in the order list as the order is rejected. I will have to fetch from the log file one by one, if needed.

    The part of the code that is placing the orders:
            print time.strftime('%X'),"Placing order:", symbol_NOHL[i],tokens_NOHL[i],BS_Flag_NOHL[i],Limit_NOHL[i],SL_NOHL[i],Target_NOHL[i],Quantity_NOHL[i]
    try:
    kite.order_place(tradingsymbol=symbol_NOHL[i], exchange="NSE", transaction_type=BS_Flag_NOHL[i], order_type="LIMIT",quantity=Quantity_NOHL[i] , product="MIS",price = RP(c[c["instrument_token"]==tokens_NOHL[i]]["last_price"].iloc[0]),validity="DAY",squareoff_value = Target_NOHL[i] ,stoploss_value =SL_NOHL[i] ,variety="bo",tag="NO") #,trailing_stoploss=trailing_stoploss
    except Exception as e1:
    # Invalid response from OMS
    print time.strftime('%X'),symbol_NOHL[i],str(e1)
  • Shaha
    Just fyi... The error first occurred for me on 18th Dec.. which was Gujarat election verdict day and had large load and volumes traded that day.
  • Shaha
    Any Updates?
  • sujith
    We have asked order logs from OMS team.
    We will let you know once they get back.
  • Shaha
    Is it only me who is getting this error?
  • sujith
    Till now, this is the first complaint we have seen like this.
  • Shaha
    U may check from backend filtering on status.
  • Shaha
    Did you get any response from OMS?
  • sujith
    The issue here is this rejection status message is from OMS. The order params look fine from our end.
    I have gone through order logs of multiple clients and in those cases, they are sending 0 values.
    We are not able to find the occurrence of this case again. We are following up with OMS guys also for this.
    We need order ids for which this issue has happened.
    Can you give more order ids for which it has happened? If possible please give us order id on the same day.
  • Shaha
    Checked history. Last occurance is on 16th that i mentioned above.
Sign In or Register to comment.