diff --git a/vnpy/trader/language/__init__.py b/vnpy/trader/language/__init__.py index 6a20d0f4..c9d512a1 100644 --- a/vnpy/trader/language/__init__.py +++ b/vnpy/trader/language/__init__.py @@ -5,5 +5,5 @@ from .chinese import text, constant # 是否要使用英文 from vnpy.trader.vtGlobal import globalSetting -if globalSetting['language'] == 'english': +if globalSetting.get('language',None) == 'english': from vnpy.trader.language.english import text, constant \ No newline at end of file diff --git a/vnpy/trader/language/chinese/constant.py b/vnpy/trader/language/chinese/constant.py index 1263a8d3..9c8ed0b7 100644 --- a/vnpy/trader/language/chinese/constant.py +++ b/vnpy/trader/language/chinese/constant.py @@ -53,6 +53,10 @@ OPTION_PUT = u'看跌期权' # 交易所类型 EXCHANGE_SSE = 'SSE' # 上交所 EXCHANGE_SZSE = 'SZSE' # 深交所 + +EXCHANGE_XSHG = 'XSHG' # 上交所(股票使用) +EXCHANGE_XSHE = 'XSHE' # 深交所(股票使用) + EXCHANGE_CFFEX = 'CFFEX' # 中金所 EXCHANGE_SHFE = 'SHFE' # 上期所 EXCHANGE_CZCE = 'CZCE' # 郑商所 diff --git a/vnpy/trader/language/english/constant.py b/vnpy/trader/language/english/constant.py index 506057aa..4bc6221c 100644 --- a/vnpy/trader/language/english/constant.py +++ b/vnpy/trader/language/english/constant.py @@ -54,6 +54,10 @@ OPTION_PUT = u'put' # 交易所类型 EXCHANGE_SSE = 'SSE' # 上交所 EXCHANGE_SZSE = 'SZSE' # 深交所 + +EXCHANGE_XSHG = 'XSHG' # 上交所(股票使用) +EXCHANGE_XSHE = 'XSHE' # 深交所(股票使用) + EXCHANGE_CFFEX = 'CFFEX' # 中金所 EXCHANGE_SHFE = 'SHFE' # 上期所 EXCHANGE_CZCE = 'CZCE' # 郑商所