- change : CTP_connect 通过 VT_setting.json 文件来指定
This commit is contained in:
parent
3cbf54cffa
commit
d4686b6275
@ -7,7 +7,7 @@ vn.ctp的gateway接入
|
||||
vtSymbol直接使用symbol
|
||||
'''
|
||||
|
||||
|
||||
import vtGlobal
|
||||
import os
|
||||
import json
|
||||
from copy import copy
|
||||
@ -98,6 +98,8 @@ class CtpGateway(VtGateway):
|
||||
def connect(self):
|
||||
"""连接"""
|
||||
# 载入json文件
|
||||
fileName = vtGlobal.VT_setting.get(self.gatewayName + '_connect')
|
||||
if fileName is None:
|
||||
fileName = self.gatewayName + '_connect.json'
|
||||
path = os.path.abspath(os.path.dirname(__file__))
|
||||
fileName = os.path.join(path, fileName)
|
||||
|
Loading…
Reference in New Issue
Block a user