Skip to content

Commit 69c88fb

Browse files
shinny-packshinny-mayanqiong
authored andcommitted
Update Version 3.4.2
1 parent 4393c9f commit 69c88fb

File tree

9 files changed

+52
-10
lines changed

9 files changed

+52
-10
lines changed

PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: tqsdk
3-
Version: 3.4.1
3+
Version: 3.4.2
44
Summary: TianQin SDK
55
Home-page: https://www.shinnytech.com/tqsdk
66
Author: TianQin

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
# built documents.
4949
#
5050
# The short X.Y version.
51-
version = u'3.4.1'
51+
version = u'3.4.2'
5252
# The full version, including alpha/beta/rc tags.
53-
release = u'3.4.1'
53+
release = u'3.4.2'
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.

doc/enterprise.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,34 @@ TqSdk2 直连功能
1818
* 减少了交易服务器依赖,程序运行稳定性提升
1919

2020

21+
.. _tqjees:
22+
23+
TqSdk2 连接资管平台功能
24+
-------------------------------------------------
25+
TqSdk2 提供了资管平台的对接支持,支持用户连接到指定资管平台
26+
27+
以连接杰宜斯的模拟服务器为例::
28+
29+
from tqsdk2 import TqApi, TqAuth, TqJees
30+
31+
acc = TqJees(td_url="tcp://129.211.138.170:10001", broker_id="JeesDemo", app_id="shinny_tqsdk_01", auth_code= "0000000000000000", user_name="杰宜斯模拟账户", password="杰宜斯模拟账户密码")
32+
api = TqApi(acc,auth= TqAuth("信易账户","账户密码"))
33+
34+
其中杰宜斯的 **模拟账户** 和 **模拟账户密码** 需要自行和杰宜斯联系获取,其他参数在杰宜斯模拟下为
35+
36+
td_url="tcp://39.101.174.218:40205"
37+
38+
broker_id="JeesDemo"
39+
40+
app_id="shinny_tqsdk_01"
41+
42+
auth_code="0000000000000000"
43+
44+
杰宜斯实盘情况下将对应信息换成实盘信息即可
45+
46+
资管平台连接模式的详细介绍,请点击 :py:class:`~tqsdk2.api.TqJees` .
47+
48+
2149
.. _tqrohon:
2250

2351
TqSdk2 连接资管平台功能
@@ -34,8 +62,11 @@ TqSdk2 提供了资管平台的对接支持,支持用户连接到指定资管
3462
其中融航模拟的 **模拟账户** 和 **模拟账户密码** 需要自行和融航联系获取,其他参数在融航模拟下为
3563

3664
td_url="tcp://129.211.138.170:10001"
65+
3766
broker_id="RohonDemo"
67+
3868
app_id="shinny_tqsdk_01"
69+
3970
auth_code="qZWmA7iTXaEO2w40"
4071

4172
融航实盘情况下将对应信息换成实盘信息即可

doc/qa.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
* 提出待解决的新问题
1010
* 回答/讨论他人提出的问题
1111

12-
点击进入 `用户论坛 <https://www.shinnytech.com/qa>`_ ,加入讨论.
12+
点击进入 `用户论坛 <https://forum.shinnytech.com/>`_ ,加入讨论.
1313

1414
.. figure:: images/qa_pic.png

doc/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ klines是一个pandas.DataFrame对象. 跟 api.get_quote() 一样, api.get_kline
265265

266266
模拟交易和论坛
267267
-------------------------------------------------
268-
如果您需要使用能保存账户资金及持仓信息的模拟交易功能, 请点击 `注册信易账号 <https://www.shinnytech.com/register-intro/>`_ ,填写完对应信息之后,并验证成功即可进入 `用户论坛 <https://www.shinnytech.com/qa>`_ .
268+
如果您需要使用能保存账户资金及持仓信息的模拟交易功能, 请点击 `注册信易账号 <https://www.shinnytech.com/register-intro/>`_ ,填写完对应信息之后,并验证成功即可进入 `用户论坛 <https://forum.shinnytech.com/>`_ .
269269

270270
.. figure:: images/tq_register.png
271271

doc/version.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
版本变更
44
=============================
5+
3.4.2 (2023/05/17)
6+
7+
* api:某些 pandas 版本下,web_gui 不更新绘制序列
8+
* docs:修改论坛地址,增加支持杰宜斯的说明
9+
10+
511
3.4.1 (2023/04/24)
612

713
* 修复: 回测时,部分情况下 expired 字段错误

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setuptools.setup(
1010
name='tqsdk',
11-
version="3.4.1",
11+
version="3.4.2",
1212
description='TianQin SDK',
1313
author='TianQin',
1414
author_email='tianqincn@gmail.com',

tqsdk/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '3.4.1'
1+
__version__ = '3.4.2'

tqsdk/api.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3310,6 +3310,7 @@ def _init_serial(self, root_list, width, default, adj_type):
33103310
columns = ["datetime"] + default_keys
33113311
for i in range(1, len(root_list)):
33123312
columns += [k + str(i) for k in default_keys]
3313+
default_attr = set(columns) | {"symbol" + str(i) for i in range(1, len(root_list))} | {"symbol", "duration"}
33133314
serial = {
33143315
"root": root_list,
33153316
"width": width,
@@ -3319,7 +3320,8 @@ def _init_serial(self, root_list, width, default, adj_type):
33193320
"adj_type": adj_type,
33203321
"calc_ids_F": [], # 前复权已经计算过的id,每个 id 只计算一次
33213322
"update_row": 0, # 起始更新数据行
3322-
"all_attr": set(columns) | {"symbol" + str(i) for i in range(1, len(root_list))} | {"symbol", "duration"},
3323+
"default_attr": default_attr,
3324+
"all_attr": default_attr,
33233325
"extra_array": {},
33243326
}
33253327
columns = Index(columns)
@@ -3526,8 +3528,11 @@ def _update_serial_multi(self, serial):
35263528
array[-1, 1] + 1) # array[-1, 1] + 1: 保持左闭右开规范
35273529

35283530
def _process_serial_extra_array(self, serial):
3529-
for col in set(serial["df"].columns.values) - serial["all_attr"]:
3530-
serial["update_row"] = 0
3531+
for col in set(serial["df"].columns.values) - serial["default_attr"]:
3532+
if col not in serial["all_attr"]:
3533+
serial["update_row"] = 0 # 只有在第一次添加某个列时,才会赋值为 0。
3534+
# klines["ma_MAIN"] = ma.ma 不是在原来的序列上原地修改,而是返回一个新的序列,
3535+
# 所以这里 serial["extra_array"] 中的列每次需要重新赋值。
35313536
serial["extra_array"][col] = serial["df"][col].to_numpy()
35323537
# 如果策略中删除了之前添加到 df 中的序列,则 extra_array 中也将其删除
35333538
for col in serial["all_attr"] - set(serial["df"].columns.values):

0 commit comments

Comments
 (0)