本文整理汇总了Python中vnpy.trader.vtFunction.getJsonPath函数的典型用法代码示例。如果您正苦于以下问题:Python getJsonPath函数的具体用法?Python getJsonPath怎么用?Python getJsonPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getJsonPath函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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__)
示例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__)
示例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__)
示例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__)
示例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__)
示例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__)
示例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__)
示例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__)
示例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__)
示例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
示例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)
示例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
示例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__)
示例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__)
示例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