Skip to content

Commit

Permalink
增加vn.trader的链行接口
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxy123 committed Feb 24, 2017
1 parent 926d093 commit 8b253d0
Show file tree
Hide file tree
Showing 10 changed files with 858 additions and 6 deletions.
4 changes: 3 additions & 1 deletion vn.huobi/vnhuobi.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ def init(self, accessKey, secretKey):
def exit(self):
"""退出"""
self.active = False
self.reqThread.join()

if self.reqThread.isAlive():
self.reqThread.join()

#----------------------------------------------------------------------
def getAccountInfo(self, market='cny'):
Expand Down
6 changes: 3 additions & 3 deletions vn.lhang/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@


if __name__ == '__main__':
apiKey = '259ad3a4-3e19-489e-935d-71b43ad65be8'
secretKey = '9A4D9094315681F62FB4C7FB6494FBD2'
apiKey = ''
secretKey = ''

# 创建API对象并初始化
api = LhangApi()
api.DEBUG = True
api.init(apiKey, secretKey)
api.init(apiKey, secretKey, 2)

# 查询行情
api.getTicker('btc_cny')
Expand Down
4 changes: 3 additions & 1 deletion vn.trader/huobiGateway/vnhuobi.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ def init(self, accessKey, secretKey):
def exit(self):
"""退出"""
self.active = False
self.reqThread.join()

if self.reqThread.isAlive():
self.reqThread.join()

#----------------------------------------------------------------------
def getAccountInfo(self, market='cny'):
Expand Down
6 changes: 6 additions & 0 deletions vn.trader/lhangGateway/LHANG_connect.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"apiKey": "请在链行官网申请",
"secretKey": "请在链行官网申请",
"interval": 1,
"debug": false
}
Empty file.
Loading

0 comments on commit 8b253d0

Please sign in to comment.