File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 55from QUANTAXIS .QIFI .QifiManager import QA_QIFIMANAGER , QA_QIFISMANAGER
66class QAQIFI_Handler (QABaseHandler ):
77 #manager = QA_QIFIMANAGER(mongo_ip)
8- manager = QA_QIFISMANAGER (mongo_ip )
8+ manager = QA_QIFISMANAGER (mongo_ip , model = 'REALTIME' )
99
1010 def get (self ):
1111 action = self .get_argument ('action' , 'acchistory' )
@@ -99,7 +99,7 @@ def get(self):
9999
100100class QAQIFIS_Handler (QABaseHandler ):
101101 #manager = QA_QIFIMANAGER(mongo_ip)
102- manager = QA_QIFISMANAGER (mongo_ip )
102+ manager = QA_QIFISMANAGER (mongo_ip , model = 'REALTIME' )
103103
104104 def get (self ):
105105 action = self .get_argument ('action' , 'acchistory' )
Original file line number Diff line number Diff line change @@ -171,9 +171,10 @@ def query_re(self, text) -> list:
171171
172172 def get_portfolio_panel (self , portfolio ) -> pd .DataFrame :
173173 r = self .get_portfolio_account (portfolio )
174+
174175 rp = [self .database .find_one ({'account_cookie' : i }, {
175176 "accounts" : 1 , 'trading_day' : 1 , '_id' : 0 }) for i in r ]
176- return pd .DataFrame ([mergex (i ['accounts' ], {'trading_day' : i ['trading_day' ]}) for i in rp ])
177+ return pd .DataFrame ([mergex (i ['accounts' ], {'trading_day' : i ['trading_day' ]}) for i in rp ]). query ( 'user_id in {}' . format ( r ))
177178
178179 def get_allaccountname (self ) -> list :
179180 return list (set ([i ['account_cookie' ] for i in self .database .find ({}, {'account_cookie' : 1 , '_id' : 0 })]))
You can’t perform that action at this time.
0 commit comments