增加ctpGateway

This commit is contained in:
msincenselee 2017-05-04 14:18:31 +08:00
parent 6163af704f
commit 0a847db046
14 changed files with 8066 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# encoding: UTF-8
import sys
import os
trader_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
sys.path.append(trader_path)
import vtConstant
print u'init {0}'.format(os.path.dirname(__file__))
from ctpGateway import CtpGateway as gateway
gatewayName = 'CTP'
gatewayDisplayName = gatewayName
gatewayType = vtConstant.GATEWAYTYPE_FUTURES
gatewayQryEnabled = True

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
# encoding: UTF-8
import json
import os
import traceback
print u'init {0}'.format(os.path.dirname(__file__))
# 默认设置
from chinese import text
# 获取目录上级路径
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
SETTING_FILENAME = 'VT_setting.json'
SETTING_FILENAME = os.path.join(path, SETTING_FILENAME)
# 打开配置文件,读取语言配置
try:
f = file(SETTING_FILENAME)
setting = json.load(f)
if setting['language'] == 'english':
from english import text
f.close()
except:
traceback.print_exc()

View File

@ -0,0 +1,18 @@
# encoding: UTF-8
LOADING_ERROR = u'读取连接配置出错,请检查'
CONFIG_KEY_MISSING = u'连接配置缺少字段,请检查'
DATA_SERVER_CONNECTED = u'行情服务器连接成功'
DATA_SERVER_DISCONNECTED = u'行情服务器连接断开'
DATA_SERVER_LOGIN = u'行情服务器登录完成'
DATA_SERVER_LOGOUT = u'行情服务器登出完成'
TRADING_SERVER_CONNECTED = u'交易服务器连接成功'
TRADING_SERVER_DISCONNECTED = u'交易服务器连接断开'
TRADING_SERVER_AUTHENTICATED = u'交易服务器验证成功'
TRADING_SERVER_LOGIN = u'交易服务器登录完成'
TRADING_SERVER_LOGOUT = u'交易服务器登出完成'
SETTLEMENT_INFO_CONFIRMED = u'结算信息确认完成'
CONTRACT_DATA_RECEIVED = u'交易合约信息获取完成'

View File

@ -0,0 +1,18 @@
# encoding: UTF-8
LOADING_ERROR = u'Error occurred when loading the config file, please check.'
CONFIG_KEY_MISSING = u'Key missing in the config file, please check.'
DATA_SERVER_CONNECTED = u'Data server connected.'
DATA_SERVER_DISCONNECTED = u'Data server disconnected'
DATA_SERVER_LOGIN = u'Data server login completed.'
DATA_SERVER_LOGOUT = u'Data server logout completed.'
TRADING_SERVER_CONNECTED = u'Trading server connected.'
TRADING_SERVER_DISCONNECTED = u'Trading server disconnected.'
TRADING_SERVER_AUTHENTICATED = u'Trading server authenticated.'
TRADING_SERVER_LOGIN = u'Trading server login completed.'
TRADING_SERVER_LOGOUT = u'Trading server logout completed.'
SETTLEMENT_INFO_CONFIRMED = u'Settlement info confirmed.'
CONTRACT_DATA_RECEIVED = u'Contract data received.'

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.