From cde77601117ef91154e0e1f1c0e629726a5b37b5 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Tue, 30 Jan 2018 13:19:49 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=E4=BF=AE=E5=A4=8DWebTrader=E7=9A=84?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/WebTrader/RS_setting.json | 4 ++-- examples/WebTrader/run.py | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/WebTrader/RS_setting.json b/examples/WebTrader/RS_setting.json index d325f36d..a298d6ad 100644 --- a/examples/WebTrader/RS_setting.json +++ b/examples/WebTrader/RS_setting.json @@ -1,4 +1,4 @@ { - "repAddress": "tcp://*:2014", - "pubAddress": "tcp://*:0602" + "repAddress": "tcp://*:6688", + "pubAddress": "tcp://*:8866" } \ No newline at end of file diff --git a/examples/WebTrader/run.py b/examples/WebTrader/run.py index 2b1b8d1f..012eeca4 100644 --- a/examples/WebTrader/run.py +++ b/examples/WebTrader/run.py @@ -13,8 +13,8 @@ from vnpy.trader.vtEvent import (EVENT_TICK, EVENT_ORDER, EVENT_TRADE, from vnpy.trader.vtObject import VtSubscribeReq, VtOrderReq, VtCancelOrderReq from vnpy.trader.app.rpcService.rsClient import MainEngineProxy -reqAddress = 'tcp://localhost:2014' -subAddress = 'tcp://localhost:0602' +reqAddress = 'tcp://localhost:6688' +subAddress = 'tcp://localhost:8866' ee = EventEngine2() me = MainEngineProxy(ee) @@ -150,7 +150,7 @@ class Order(Resource): return None data = me.getAllOrders() - l = {o.__dict__ for o in data} + l = [o.__dict__ for o in data] return l #---------------------------------------------------------------------- @@ -225,7 +225,7 @@ class Trade(Resource): return None data = me.getAllTrades() - l = {o.__dict__ for o in data} + l = [o.__dict__ for o in data] return l @@ -250,7 +250,7 @@ class Account(Resource): return None data = me.getAllAccounts() - l = {o.__dict__ for o in data} + l = [o.__dict__ for o in data] return l @@ -275,7 +275,7 @@ class Position(Resource): return None data = me.getAllPositions() - l = {o.__dict__ for o in data} + l = [o.__dict__ for o in data] return l @@ -301,7 +301,7 @@ class Contract(Resource): return None data = me.getAllContracts() - l = {o.__dict__ for o in data} + l = [o.__dict__ for o in data] return l @@ -326,7 +326,7 @@ class Log(Resource): return None data = me.getLog() - l = {o.__dict__ for o in data} + l = [o.__dict__ for o in data] return l @@ -351,7 +351,7 @@ class Error(Resource): return None data = me.getError() - l = {o.__dict__ for o in data} + l = [o.__dict__ for o in data] return l