Administrator
2023-10-17 9e7aacb39b416914e8162d0abb9ee238f15da284
trade/trade_huaxin.py
@@ -37,12 +37,10 @@
    async_log_util.info(logger_trade, f"{code} trade_huaxin.order_volume 开始")
    try:
        price = round(float(price), 2)
        # todo 测试买5价下单
        # price = price - 0.05
        if code.find("00") != 0 and code.find("60") != 0:
            raise Exception("只支持00开头与60开头的代码下单")
        # 保存下单信息
        huaxin.huaxin_delegate_postion_manager.place_order(code, price, count, last_data,order_ref)
        huaxin.huaxin_delegate_postion_manager.place_order(code, price, count, last_data, order_ref)
        if not constant.TRADE_ENABLE:
            return
        result = None
@@ -82,7 +80,6 @@
        async_log_util.info(logger_trade, f"{code} trade_huaxin.order_volume 结束")
def order_success(code, accountId, orderSysID, orderRef, insertTime):
    # 加入系统订单号
    __TradeOrderIdManager.add_order_id(code, accountId, orderSysID)
@@ -114,6 +111,7 @@
        hx_logger_trade_debug.warning("{}校验真实下单位置出错:{}", code, str(e))
    return None
# 撤单
def cancel_order(code, msg=''):
    if not constant.TRADE_ENABLE: