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