Unable to place SL-Limit Order via API (EXCH:16416:Invalid Counter Broker Id)

Hi,

I am looking to place a SL-Limit order via API and the order gets rejected with the following error. There is no info on this error and I am stuck. Appreciate if someone can help

Situation: I have an active trade (Long on NSE:NIFTY22O2017400CE for 1 lot, entry at 191). I am trying to place a stop loss limit order at 165 as below but the order gets rejected.

Instrument: NSE:NIFTY22O2017400CE

Error message : EXCH:16416:Invalid Counter Broker Id

orderData = {‘symbol’: ‘NSE:NIFTY22O2017400CE’, ‘qty’: 50, ‘type’: 4, ‘side’: -1, ‘productType’: ‘INTRADAY’, ‘limitPrice’: 165.0, ‘stopPrice’: 165.05, ‘validity’: ‘DAY’, ‘disclosedQty’: 50, ‘offlineOrder’: False}

orderResp = fyers.place_order(orderData)

I had done some digging myself. Key conditions for SLM are

  • StopPrice and limit price are mandatory (both provided above)
  • For Sell(short), Stop Price should be higher than limit price (in this case, its correct)
  • Price should be multiple of tick size (thats also taken care of)

So, not really sure what is going on.

Thanks