Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
Merge pull request #25 from rainx/master
Browse files Browse the repository at this point in the history
commit
  • Loading branch information
yutiansut committed Nov 14, 2017
2 parents d0962f1 + c6867c5 commit 76f75de
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.57
-----
* GetSecurityList name.rstrip("\x00") Merge pull request #100 from JaysonAlbert/hotfix

1.56
------
* connect增加了time_out 参数 Merge pull request #99 from yutiansut/master
Expand Down
2 changes: 1 addition & 1 deletion pytdx/parser/get_security_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def parseResponse(self, body_buf):
pre_close_raw, reversed_bytes2) = struct.unpack("<6sH8s4sBI4s", one_bytes)

code = code.decode("utf-8")
name = name_bytes.decode("gbk")
name = name_bytes.decode("gbk").rstrip("\x00")
pre_close = get_volume(pre_close_raw)
pos += 29

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

setup(
name='pytdx',
version='1.56',
version='1.57',
description='A Python Interface to TDX protocol',
long_description=long_description,
author='RainX<Jing Xu>',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_exhq.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_all_functions():

api = TdxExHq_API(auto_retry=True)
try:
with api.connect('121.14.110.210', 7727):
with api.connect('121.14.110.210', 7727, time_out=30):
log.info("获取市场代码")
data = api.get_markets()
assert data is not None
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hq.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_all_functions(multithread, heartbeat, auto_retry, raise_exception):

api = TdxHq_API(multithread=multithread, heartbeat=heartbeat,
auto_retry=auto_retry, raise_exception=raise_exception)
with api.connect():
with api.connect(time_out=30):
log.info("获取股票行情")
stocks = api.get_security_quotes([(0, "000001"), (1, "600300")])
assert stocks is not None
Expand Down

0 comments on commit 76f75de

Please sign in to comment.