From 0fa314faa8148d79b308ce256e66b36415d3a648 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Mon, 25 Mar 2019 16:31:15 +0800 Subject: [PATCH] [Fix]change brokerid to str in CtpGateway --- tests/trader/run.py | 2 ++ vnpy/gateway/ctp/ctp_gateway.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/trader/run.py b/tests/trader/run.py index f7bd4df1..1a402f82 100644 --- a/tests/trader/run.py +++ b/tests/trader/run.py @@ -9,6 +9,7 @@ from vnpy.gateway.futu import FutuGateway from vnpy.gateway.ib import IbGateway from vnpy.gateway.ctp import CtpGateway from vnpy.gateway.tiger import TigerGateway +from vnpy.gateway.oes import OesGateway from vnpy.app.cta_strategy import CtaStrategyApp from vnpy.app.csv_loader import CsvLoaderApp @@ -26,6 +27,7 @@ def main(): main_engine.add_gateway(FutuGateway) main_engine.add_gateway(BitmexGateway) main_engine.add_gateway(TigerGateway) + main_engine.add_gateway(OesGateway) main_engine.add_app(CtaStrategyApp) main_engine.add_app(CsvLoaderApp) diff --git a/vnpy/gateway/ctp/ctp_gateway.py b/vnpy/gateway/ctp/ctp_gateway.py index 68419d18..885da743 100644 --- a/vnpy/gateway/ctp/ctp_gateway.py +++ b/vnpy/gateway/ctp/ctp_gateway.py @@ -127,7 +127,7 @@ class CtpGateway(BaseGateway): default_setting = { "用户名": "", "密码": "", - "经纪商代码": 0, + "经纪商代码": "", "交易服务器": "", "行情服务器": "", "产品名称": "",