From d32c3100af3484d110033e5bc5f45f222717b7d2 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Mon, 18 Feb 2019 13:09:19 +0800 Subject: [PATCH] [Add] load global setting from json file --- vnpy/trader/setting.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vnpy/trader/setting.py b/vnpy/trader/setting.py index ada103fa..ae2011f9 100644 --- a/vnpy/trader/setting.py +++ b/vnpy/trader/setting.py @@ -4,6 +4,8 @@ Global setting of VN Trader. from logging import CRITICAL +from .utility import load_json + SETTINGS = { "font.family": "Arial", "font.size": 12, @@ -19,4 +21,12 @@ SETTINGS = { "email.password": "", "email.sender": "", "email.receiver": "", + + "rqdata.username": "", + "rqdata.password": "" } + + +# Load global setting from json file. +SETTING_FILENAME = "vt_setting.json" +SETTINGS.update(load_json(SETTING_FILENAME))