How i can place BO order using Fyers API?

Resolved
data = {
    "symbol":ce_symbol,
    "qty":75,
    "type":1,
    "side":1,
    "productType":"BO",
    "validity":"DAY",
    "disclosedQty":0,
    "offlineOrder":False,
    "stopLoss":ltp-10,
    "takeProfit":ltp+20,
    "orderTag":"tag1"
}
response = fyers.place_order(data=data)
print(response)

output: {'code': -50, 'message': 'productType must be one of the following: "CNC", "MARGIN", "INTRADAY", "MTF"', 's': 'error'}
When i tried placing BO order using fyers API, it is not accepting the order.
Please reply,
and give proper solution to this.

Best reply by Inactive Member

Hello Suryakant Paryekar, the inputs you’ve followed are correct. However, please exclude the 'OrderTag' field from your input, as it’s not supported for Bracket (BO) or Cover (CO) orders. For more information, please refer to this doc.


View original
2 replies