| | |
| | | |
| | | |
| | | def run(trade_response_: TradeResponse, pipe_l2=None, pipe_strategy=None): |
| | | logger_system.info("交易进程ID:{}", os.getpid()) |
| | | __init_trade_data_server() |
| | | global l2pipe |
| | | l2pipe = pipe_l2 |
| | | try: |
| | | logger_system.info("交易进程ID:{}", os.getpid()) |
| | | __init_trade_data_server() |
| | | global l2pipe |
| | | l2pipe = pipe_l2 |
| | | |
| | | global strategy_pipe |
| | | strategy_pipe = pipe_strategy |
| | | global strategy_pipe |
| | | strategy_pipe = pipe_strategy |
| | | |
| | | global trade_response |
| | | trade_response = trade_response_ |
| | | global trade_response |
| | | trade_response = trade_response_ |
| | | |
| | | t1 = threading.Thread(target=lambda: trade_client_server.run(), daemon=True) |
| | | t1.start() |
| | | t1 = threading.Thread(target=lambda: trade_client_server.run(), daemon=True) |
| | | t1.start() |
| | | |
| | | global tradeCommandManager |
| | | tradeCommandManager = command_manager.TradeCommandManager() |
| | | tradeCommandManager.init(MyTradeActionCallback(), l2pipe, pipe_strategy) |
| | | logger_system.info("华鑫交易服务启动") |
| | | global tradeCommandManager |
| | | tradeCommandManager = command_manager.TradeCommandManager() |
| | | tradeCommandManager.init(MyTradeActionCallback(), l2pipe, pipe_strategy) |
| | | logger_system.info("华鑫交易服务启动") |
| | | except Exception as e: |
| | | logger_system.exception(e) |
| | | # 不需要运行命令解析 |
| | | # tradeCommandManager.run() |
| | | while True: |