本文整理汇总了Python中vnpy.trader.vtFunction.getJsonPath函数的典型用法代码示例。如果您正苦于以下问题:Python getJsonPath函数的具体用法?Python getJsonPath怎么用?Python getJsonPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getJsonPath函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, eventEngine, gatewayName='IB'):
"""Constructor"""
super(IbGateway, self).__init__(eventEngine, gatewayName)
self.host = EMPTY_STRING # 连接地址
self.port = EMPTY_INT # 连接端口
self.clientId = EMPTY_INT # 用户编号
self.accountCode = EMPTY_STRING # 账户编号
self.tickerId = 0 # 订阅行情时的代码编号
self.tickDict = {} # tick快照字典,key为tickerId,value为VtTickData对象
self.tickProductDict = {} # tick对应的产品类型字典,key为tickerId,value为产品类型
self.orderId = 0 # 订单编号
self.orderDict = {} # 报单字典,key为orderId,value为VtOrderData对象
self.accountDict = {} # 账户字典
self.contractDict = {} # 合约字典
self.subscribeReqDict = {} # 用来保存订阅请求的字典
self.connected = False # 连接状态
self.api = IbWrapper(self) # API接口
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:raycool,项目名称:vnpy,代码行数:28,代码来源:ibGateway.py
示例2: __init__
def __init__(self, eventEngine, gatewayName='LBANK'):
"""Constructor"""
super(LbankGateway, self).__init__(eventEngine, gatewayName)
self.api = LbankApi(self)
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:h1222443,项目名称:vnpy,代码行数:8,代码来源:lbankGateway.py
示例3: __init__
def __init__(self, eventEngine, gatewayName='BithumbGateway'):
super(BithumbGateway, self).__init__(eventEngine, gatewayName)
self.restApi = RestApi(self) # type: RestApi
self.qryEnabled = False
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:raycool,项目名称:vnpy,代码行数:9,代码来源:bithumbGateway.py
示例4: __init__
def __init__(self, eventEngine, gatewayName=''):
"""Constructor"""
super(BitfinexGateay, self).__init__(eventEngine, gatewayName)
self.api = GatewayApi(self)
self.qryEnabled = False # 是否要启动循环查询
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:raycool,项目名称:vnpy,代码行数:10,代码来源:bitfinexGateway.py
示例5: __init__
def __init__(self, eventEngine, gatewayName=''):
"""Constructor"""
super(FcoinGateway, self).__init__(eventEngine, gatewayName)
self.restApi = RestApi(self)
self.wsApi = WebsocketApi(self)
self.qryEnabled = False # 是否要启动循环查询
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:aaront2000,项目名称:vnpy,代码行数:11,代码来源:fcoinGateway.py
示例6: __init__
def __init__(self, eventengine, gatewayName='TKPRO'):
"""Constructor"""
super(TkproGateway, self).__init__(eventengine, gatewayName)
self.dataApi = TkproDataApi(self) # 行情
self.tradeApi = TkproTradeApi(self) # 交易
self.qryEnabled = False # 是否要启动循环查询
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:raycool,项目名称:vnpy,代码行数:11,代码来源:tkproGateway.py
示例7: __init__
def __init__(self, eventEngine, gatewayName='HUOBI'):
"""Constructor"""
super(HuobiGateway, self).__init__(eventEngine, gatewayName)
self.market = 'cny'
self.tradeApi = HuobiTradeApi(self)
self.dataApi = HuobiDataApi(self)
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:QuantFeng,项目名称:vnpy,代码行数:11,代码来源:huobiGateway.py
示例8: __init__
def __init__(self, eventEngine, gatewayName='OKCOIN'):
"""Constructor"""
super(OkcoinGateway, self).__init__(eventEngine, gatewayName)
self.api = Api(self)
self.leverage = 0
self.connected = False
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:h1222443,项目名称:vnpy,代码行数:11,代码来源:okcoinGateway.py
示例9: __init__
def __init__(self, eventEngine, gatewayName='OKEX'):
"""Constructor"""
super(OkexGateway, self).__init__(eventEngine, gatewayName)
self.spotApi = SpotApi(self)
# self.api_contract = Api_contract(self)
self.leverage = 0
self.connected = False
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:raycool,项目名称:vnpy,代码行数:12,代码来源:okexGateway.py
示例10: __init__
def __init__(self, eventEngine, gatewayName = "KORBIT"):
"""Constructor"""
super(korbitGateway , self).__init__(eventEngine, gatewayName)
self.tradeApi = KorbitTradeApi(self)
self.dataApi = KorbitDataApi(self)
self.fileName = self.gatewayName + "_connect.json"
self.filePath = getJsonPath(self.fileName, __file__)
self.accountID = "NONE"
self.total_count = 0
self.delayTime = 3
开发者ID:KobeZhao,项目名称:vnpy,代码行数:13,代码来源:korbitGateway.py
示例11: __init__
def __init__(self, eventEngine, gatewayName=''):
"""Constructor"""
super(OkexfGateway, self).__init__(eventEngine, gatewayName)
self.qryEnabled = False # 是否要启动循环查询
self.localRemoteDict = {} # localID:remoteID
self.orderDict = {} # remoteID:order
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
self.restApi = OkexfRestApi(self)
self.wsApi = OkexfWebsocketApi(self)
开发者ID:viponedream,项目名称:vnpy,代码行数:13,代码来源:okexfGateway.py
示例12: __init__
def __init__(self, eventEngine, gatewayName=''):
"""Constructor"""
super(BitmexGateway, self).__init__(eventEngine, gatewayName)
self.restApi = BitmexRestApi(self)
self.wsApi = BitmexWebsocketApi(self)
self.qryEnabled = False # 是否要启动循环查询
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
self.exchange = constant.EXCHANGE_BITMEX
开发者ID:roccox,项目名称:vnpy,代码行数:13,代码来源:bitmexGateway.py
示例13: __init__
def __init__(self, eventEngine, gatewayName='KSGOLD'):
"""Constructor"""
super(KsgoldGateway, self).__init__(eventEngine, gatewayName)
self.tdApi = KsgoldTdApi(self) # 黄金接口只有交易API
self.tdConnected = False # 交易API连接状态
self.qryEnabled = False # 是否要启动循环查询
self.orderInited = False # 委托初始化查询
self.tradeInited = False # 成交初始化查询
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:raycool,项目名称:vnpy,代码行数:13,代码来源:ksgoldGateway.py
示例14: __init__
def __init__(self, eventEngine, gatewayName='QDP'):
"""Constructor"""
super(QdpGateway, self).__init__(eventEngine, gatewayName)
self.mdApi = QdpMdApi(self) # 行情API
self.tdApi = QdpTdApi(self) # 交易API
self.mdConnected = False # 行情API连接状态,登录完成后为True
self.tdConnected = False # 交易API连接状态
self.qryEnabled = False # 是否要启动循环查询
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:raycool,项目名称:vnpy,代码行数:14,代码来源:qdpGateway.py
示例15: __init__
def __init__(self, eventEngine, gatewayName='COINCHECK'):
"""Constructor"""
super(CoincheckGateway, self).__init__(eventEngine, gatewayName)
self.tradeApi = CoincheckTradeApi(self)
#self.dataApi = CoincheckDataApi(self)
self.dataApi = CoincheckSocketDataApi(self)
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
self.total_count = 0
self.delayTime = 3
开发者ID:raycool,项目名称:vnpy,代码行数:14,代码来源:coincheckGateway.py
示例16: __init__
def __init__(self, eventEngine, gatewayName='HUOBI'):
"""Constructor"""
super(HuobiGateway, self).__init__(eventEngine, gatewayName)
self.dataApi = HuobiDataApi(self) # 行情API
self.tradeApi = HuobiTradeApi(self) # 交易API
self.mdConnected = False # 行情API连接状态,登录完成后为True
self.tdConnected = False # 交易API连接状态
self.qryEnabled = False # 是否要启动循环查询
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:KobeZhao,项目名称:vnpy,代码行数:14,代码来源:huobiGateway.py
示例17: __init__
def __init__(self, eventEngine, gatewayName='CTP'):
"""Constructor"""
# print "%s.%s.%s" % (__name__, self.__class__.__name__, get_current_function_name())
super(CtpGateway, self).__init__(eventEngine, gatewayName)
self.mdApi = CtpMdApi(self) # 行情API
self.tdApi = CtpTdApi(self) # 交易API
self.mdConnected = False # 行情API连接状态,登录完成后为True
self.tdConnected = False # 交易API连接状态
self.qryEnabled = False # 循环查询
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:QuantFeng,项目名称:vnpy,代码行数:15,代码来源:ctpGateway.py
示例18: init_client
def init_client(self):
fileName = globalSetting.get('gateway_name', '') + '_connect.json'
filePath = getJsonPath(fileName, __file__)
try:
with open(filePath, 'r') as f:
# 解析json文件
setting = json.load(f)
apiKey = setting.get('accessKey',None)
secretKey = setting.get('secretKey',None)
if apiKey is not None and secretKey is not None:
self.client = Client(apiKey, secretKey)
except IOError:
self.strategy.writeCtaError(u'BINANCE读取连接配置{}出错,请检查'.format(filePath))
return
开发者ID:uniwin,项目名称:vnpydjv,代码行数:16,代码来源:binance_data.py
示例19: __init__
def __init__(self, eventEngine, gatewayName='LTS'):
"""Constructor"""
super(LtsGateway, self).__init__(eventEngine, gatewayName)
self.mdApi = LtsMdApi(self)
self.tdApi = LtsTdApi(self)
self.qryApi = LtsQryApi(self)
self.mdConnected = False
self.tdConnected = False
self.qryConnected = False
self.qryEnabled = False # 是否要启动循环查询
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
开发者ID:raycool,项目名称:vnpy,代码行数:16,代码来源:ltsGateway.py
示例20: __init__
def __init__(self, eventEngine , gatewayName='BINANCE'):
"""Constructor"""
super(BinanceGateway, self).__init__(eventEngine, gatewayName)
self.api_spot = BinanceApi(self)
self.connected = False
self.qryEnabled = True
self.interval = 30
self.accountID = "None"
self.total_count = 0
# gateway 配置文件
self.fileName = self.gatewayName + '_connect.json'
self.filePath = getJsonPath(self.fileName, __file__)
# 消息调试
self.log_message = False
开发者ID:uniwin,项目名称:vnpydjv,代码行数:18,代码来源:binanceGateway.py
注:本文中的vnpy.trader.vtFunction.getJsonPath函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论