You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Angelone Smartapi中下达Bracket Order?订单被拒求助

BO订单被拒问题的解决方案

现有下单函数

def place_order(token,symbol,qty,buy_sell,ordertype,price,variety= 'NORMAL',exch_seg='NSE',triggerprice=0):
    try:
        orderparams = {
            "variety": variety,
            "tradingsymbol": symbol,
            "symboltoken": token,
            "transactiontype": buy_sell,
            "exchange": exch_seg,
            "ordertype": ordertype,
            "producttype": "INTRADAY",
            "duration": "DAY",
            "price": price,
            "squareoff": "0",
            "stoploss": "0",
            "quantity": qty,
            "triggerprice":triggerprice
            }
        orderId = costantine.SMART_API_OBJ.placeOrder(orderparams)
        print(f"The instrument {symbol} order id is: {orderId}")
    except Exception as e:
        print(f'instrument {symbol} Order placement failed:  {e}')

问题详情

调用自定义place_orderX函数提交BO订单时被拒绝,错误提示:

BO is not allowed for this stock. Kindly place an order with a different product type.

调用代码示例:

place_orderX('ROBO', instrument, symboltoken, 1 , "BUY", "LIMIT", 'BO', ltp, slDelta, targetDelta,slDelta)

解决步骤

  • 验证标的支持性:部分股票不支持BO(括号订单)产品类型,需先确认当前标的是否允许使用BO订单。
  • 修正产品类型参数:BO订单的producttype不能设为INTRADAY,需改为"BO";同时当前代码中squareoff和stoploss设为"0"不符合BO订单要求,需传入有效的止盈(如targetDelta)和止损(如slDelta)数值。
  • 匹配variety与产品类型:BO订单对应的variety参数需设为"ROBO",确保参数间逻辑一致。
  • 检查价格合规性:确认触发价、止损价符合交易所价格档位规则,避免因价格无效导致订单被拒。

内容的提问来源于stack exchange,提问作者qagourab

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 01:07:49