diff --git a/tests/trader/run.py b/tests/trader/run.py index 610e6f7d..b06b4af4 100644 --- a/tests/trader/run.py +++ b/tests/trader/run.py @@ -35,20 +35,20 @@ def main(): main_engine = MainEngine(event_engine) main_engine.add_gateway(XtpGateway) - # main_engine.add_gateway(CtpGateway) + main_engine.add_gateway(CtpGateway) # main_engine.add_gateway(CtptestGateway) - # main_engine.add_gateway(FemasGateway) - # main_engine.add_gateway(IbGateway) - # main_engine.add_gateway(FutuGateway) - # main_engine.add_gateway(BitmexGateway) - # main_engine.add_gateway(TigerGateway) - # main_engine.add_gateway(OesGateway) - # main_engine.add_gateway(OkexGateway) - # main_engine.add_gateway(HuobiGateway) - # main_engine.add_gateway(BitfinexGateway) - # main_engine.add_gateway(OnetokenGateway) - # main_engine.add_gateway(OkexfGateway) - # main_engine.add_gateway(HbdmGateway) + main_engine.add_gateway(FemasGateway) + main_engine.add_gateway(IbGateway) + main_engine.add_gateway(FutuGateway) + main_engine.add_gateway(BitmexGateway) + main_engine.add_gateway(TigerGateway) + main_engine.add_gateway(OesGateway) + main_engine.add_gateway(OkexGateway) + main_engine.add_gateway(HuobiGateway) + main_engine.add_gateway(BitfinexGateway) + main_engine.add_gateway(OnetokenGateway) + main_engine.add_gateway(OkexfGateway) + main_engine.add_gateway(HbdmGateway) main_engine.add_app(CtaStrategyApp) main_engine.add_app(CtaBacktesterApp) diff --git a/vnpy/gateway/xtp/xtp_gateway.py b/vnpy/gateway/xtp/xtp_gateway.py index 9a66f309..4c3fa492 100644 --- a/vnpy/gateway/xtp/xtp_gateway.py +++ b/vnpy/gateway/xtp/xtp_gateway.py @@ -654,7 +654,7 @@ class XtpTraderApi(API.TraderSpi): """""" self.check_error("ε§”ζ‰˜δΈ‹ε•", error_info) - direction, offset = DIRECTION_XTP2VT[ order_info.side] + direction, offset = DIRECTION_XTP2VT[order_info.side] order = OrderData( symbol=order_info.ticker, @@ -814,4 +814,3 @@ class XtpTraderApi(API.TraderSpi): self.gateway.on_position(position) self.short_positions.clear() -