[Mod] flake8 code quanlity improve

This commit is contained in:
vn.py 2019-05-23 09:42:57 +08:00
parent f30fce70bd
commit cb54d52e86
2 changed files with 14 additions and 15 deletions

View File

@ -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)

View File

@ -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()