Skip to content

Commit

Permalink
Update Version 3.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
shinny-pack authored and shinny-mayanqiong committed Mar 1, 2024
1 parent 55d7ae2 commit 160baa4
Show file tree
Hide file tree
Showing 10 changed files with 131 additions and 108 deletions.
2 changes: 1 addition & 1 deletion PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: tqsdk
Version: 3.5.3
Version: 3.5.4
Summary: TianQin SDK
Home-page: https://www.shinnytech.com/tqsdk
Author: TianQin
Expand Down
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
version = u'3.5.3'
version = u'3.5.4'
# The full version, including alpha/beta/rc tags.
release = u'3.5.3'
release = u'3.5.4'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
1 change: 1 addition & 0 deletions doc/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ TqSdk 模块参考
tqsdk.auth.rst
tqsdk.account.rst
tqsdk.tqkq.rst
tqsdk.tqzq.rst
tqsdk.sim.rst
tqsdk.multiaccount.rst
tqsdk.objs.rst
Expand Down
7 changes: 7 additions & 0 deletions doc/reference/tqsdk.tqzq.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _tqsdk.tqzq:

tqsdk.TqZq - 众期交易类
------------------------------------------------------------------
.. autoclass:: tqsdk.TqZq
:members:
:inherited-members:
8 changes: 7 additions & 1 deletion doc/version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

版本变更
=============================
3.5.4 (2024/03/01)

* 修复:回测时,订阅多合约 K 线时,成交可能不符合预期的问题
* docs:补充 :py:class:`~tqsdk.TqZq` 文档


3.5.3 (2024/02/23)

* 修复:使用 :py:class:`~tqsdk.TargetPosScheduler`,并且最后一项调仓目标为 0 时,可能出现任务无法结束的问题
Expand All @@ -25,7 +31,7 @@
3.5.0 (2024/01/18)

* 新增:行情增加外盘主连合约,通过 ``api.query_quotes(exchange_id=['KQD'])`` 查询外盘合约,外盘合约地址参考 :ref:`kqd_symbol`
* 新增::py:meth:`~tqsdk.TqZq` 众期账户类型,支持连接众期服务器交易
* 新增::py:class:`~tqsdk.TqZq` 众期账户类型,支持连接众期服务器交易
* 优化::py:meth:`~tqsdk.TqApi.query_quotes` 函数 ins_class、exchange_id、product_id 参数支持 list
* 修复:ticks 回测时,可能出现账户结算信息为 nan 的问题

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

setuptools.setup(
name='tqsdk',
version="3.5.3",
version="3.5.4",
description='TianQin SDK',
author='TianQin',
author_email='[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion tqsdk/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.5.3'
__version__ = '3.5.4'
4 changes: 2 additions & 2 deletions tqsdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
from .__version__ import __version__


UnionTradeable = Union[TqAccount, TqKq, TqKqStock, TqSim, TqSimStock]
UnionTradeable = Union[TqAccount, TqKq, TqZq, TqKqStock, TqSim, TqSimStock]


class TqApi(TqBaseApi):
Expand Down Expand Up @@ -1339,7 +1339,7 @@ def _get_insert_order_future_pack(self, symbol, direction, offset, volume, limit
}
if limit_price == "BEST" or limit_price == "FIVELEVEL":
if exchange_id != "CFFEX":
raise Exception(f"{symbol} 不支持 {limit_price} 市价单,请修改 limit_price 参数。仅中金所支持 BESE / FIVELEVEL")
raise Exception(f"{symbol} 不支持 {limit_price} 市价单,请修改 limit_price 参数。仅中金所支持 BEST / FIVELEVEL")
if exchange_id in ["CFFEX"] and advanced == "FOK":
raise Exception(f"{symbol} 不支持 advanced 为 \"FOK\"。中金所不支持在指定 BEST / FIVELEVEL 的情况下使用 FOK 。")
msg["price_type"] = limit_price
Expand Down
207 changes: 108 additions & 99 deletions tqsdk/backtest/backtest.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tqsdk/multiaccount.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TqMultiAccount(object):
"""

def __init__(self, accounts: Optional[List[Union[TqAccount, TqKq, TqKqStock, TqSim, TqSimStock, TqZq]]] = None):
def __init__(self, accounts: Optional[List[Union[TqAccount, TqKq, TqZq, TqKqStock, TqSim, TqSimStock, TqZq]]] = None):
"""
创建 TqMultiAccount 实例
Expand Down

0 comments on commit 160baa4

Please sign in to comment.