From b0edd7fe884edaa344a801f0b4769604f7c88d5d Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Wed, 5 Jun 2019 19:24:44 +0800 Subject: [PATCH] [Mod] change init function of RqDataClient --- vnpy/trader/rqdata.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vnpy/trader/rqdata.py b/vnpy/trader/rqdata.py index 87515e59..630a82f6 100644 --- a/vnpy/trader/rqdata.py +++ b/vnpy/trader/rqdata.py @@ -36,11 +36,15 @@ class RqdataClient: self.inited = False self.symbols = set() - def init(self): + def init(self, username="", password=""): """""" if self.inited: return True + if username and password: + self.username = username + self.password = password + if not self.username or not self.password: return False