| | |
| | | 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) |
| | | shadow_price = tool.get_shadow_price(price) |
| | | huaxin.huaxin_delegate_postion_manager.place_order(code, price, count, last_data, order_ref, |
| | | shadow_price=shadow_price) |
| | | if not constant.TRADE_ENABLE: |
| | | return |
| | | result = None |
| | | blocking = False |
| | | try: |
| | | async_log_util.info(logger_trade, f"{code}下单开始") |
| | | result = huaxin_trade_api.order(1, code, count, price, blocking=blocking, order_ref=order_ref) |
| | | result = huaxin_trade_api.order(1, code, count, price, blocking=blocking, order_ref=order_ref, |
| | | shadow_price=shadow_price) |
| | | async_log_util.info(logger_trade, f"{code}下单结束") |
| | | except Exception as e: |
| | | if str(e).find("超时") >= 0: |