Skip to content

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

@Algotrader77

Description

@Algotrader77

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.

I understand that the SL-L and SL-M orders are placed directly at the exchange. So, is this happening bcos Fyers is not sending any additional parameters that the exchange expects from broker?

I am unable to do any trades due to this issue (as I cant put in SLs).. Pls help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions