Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
  • Loading branch information
yutiansut committed May 18, 2022
1 parent 2c9679c commit 9ab7207
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions QUANTAXIS/QAWebServer/qifiserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from QUANTAXIS.QIFI.QifiManager import QA_QIFIMANAGER, QA_QIFISMANAGER
class QAQIFI_Handler(QABaseHandler):
#manager = QA_QIFIMANAGER(mongo_ip)
manager = QA_QIFISMANAGER(mongo_ip)
manager = QA_QIFISMANAGER(mongo_ip,model='REALTIME')

def get(self):
action = self.get_argument('action', 'acchistory')
Expand Down Expand Up @@ -99,7 +99,7 @@ def get(self):

class QAQIFIS_Handler(QABaseHandler):
#manager = QA_QIFIMANAGER(mongo_ip)
manager = QA_QIFISMANAGER(mongo_ip)
manager = QA_QIFISMANAGER(mongo_ip,model='REALTIME')

def get(self):
action = self.get_argument('action', 'acchistory')
Expand Down
3 changes: 2 additions & 1 deletion QUANTAXIS/QIFI/QifiManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@ def query_re(self, text) -> list:

def get_portfolio_panel(self, portfolio) -> pd.DataFrame:
r = self.get_portfolio_account(portfolio)

rp = [self.database.find_one({'account_cookie': i}, {
"accounts": 1, 'trading_day': 1, '_id': 0}) for i in r]
return pd.DataFrame([mergex(i['accounts'], {'trading_day': i['trading_day']}) for i in rp])
return pd.DataFrame([mergex(i['accounts'], {'trading_day': i['trading_day']}) for i in rp]).query('user_id in {}'.format(r))

def get_allaccountname(self) -> list:
return list(set([i['account_cookie'] for i in self.database.find({}, {'account_cookie': 1, '_id': 0})]))
Expand Down

0 comments on commit 9ab7207

Please sign in to comment.