[Fix]修复WebTrader的查询数据结构bug

This commit is contained in:
vn.py 2018-01-30 13:19:49 +08:00
parent abc59efac4
commit cde7760111
2 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
{ {
"repAddress": "tcp://*:2014", "repAddress": "tcp://*:6688",
"pubAddress": "tcp://*:0602" "pubAddress": "tcp://*:8866"
} }

View File

@ -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.vtObject import VtSubscribeReq, VtOrderReq, VtCancelOrderReq
from vnpy.trader.app.rpcService.rsClient import MainEngineProxy from vnpy.trader.app.rpcService.rsClient import MainEngineProxy
reqAddress = 'tcp://localhost:2014' reqAddress = 'tcp://localhost:6688'
subAddress = 'tcp://localhost:0602' subAddress = 'tcp://localhost:8866'
ee = EventEngine2() ee = EventEngine2()
me = MainEngineProxy(ee) me = MainEngineProxy(ee)
@ -150,7 +150,7 @@ class Order(Resource):
return None return None
data = me.getAllOrders() data = me.getAllOrders()
l = {o.__dict__ for o in data} l = [o.__dict__ for o in data]
return l return l
#---------------------------------------------------------------------- #----------------------------------------------------------------------
@ -225,7 +225,7 @@ class Trade(Resource):
return None return None
data = me.getAllTrades() data = me.getAllTrades()
l = {o.__dict__ for o in data} l = [o.__dict__ for o in data]
return l return l
@ -250,7 +250,7 @@ class Account(Resource):
return None return None
data = me.getAllAccounts() data = me.getAllAccounts()
l = {o.__dict__ for o in data} l = [o.__dict__ for o in data]
return l return l
@ -275,7 +275,7 @@ class Position(Resource):
return None return None
data = me.getAllPositions() data = me.getAllPositions()
l = {o.__dict__ for o in data} l = [o.__dict__ for o in data]
return l return l
@ -301,7 +301,7 @@ class Contract(Resource):
return None return None
data = me.getAllContracts() data = me.getAllContracts()
l = {o.__dict__ for o in data} l = [o.__dict__ for o in data]
return l return l
@ -326,7 +326,7 @@ class Log(Resource):
return None return None
data = me.getLog() data = me.getLog()
l = {o.__dict__ for o in data} l = [o.__dict__ for o in data]
return l return l
@ -351,7 +351,7 @@ class Error(Resource):
return None return None
data = me.getError() data = me.getError()
l = {o.__dict__ for o in data} l = [o.__dict__ for o in data]
return l return l