From a2ba747859042f141e016e02f8e8a058f6ad7e1a Mon Sep 17 00:00:00 2001 From: msincenselee Date: Thu, 13 Feb 2020 09:38:44 +0800 Subject: [PATCH] [bug fix] --- vnpy/app/risk_manager/engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnpy/app/risk_manager/engine.py b/vnpy/app/risk_manager/engine.py index 3a54fdde..ede4e115 100644 --- a/vnpy/app/risk_manager/engine.py +++ b/vnpy/app/risk_manager/engine.py @@ -187,7 +187,7 @@ class RiskManagerEngine(BaseEngine): round(account.frozen * 100 / (account.balance + 0.01), 2), \ self.percent_limit if len(self.account_dict.values()) > 0: - account = self.account_dict.values()[0] + account = list(self.account_dict.values())[0] return account.balance, \ account.available, \ round(account.frozen * 100 / (account.balance + 0.01), 2), \