Skip to content

Commit

Permalink
Update Version 3.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
shinny-pack authored and shinny-mayanqiong committed Jan 24, 2024
1 parent d58739b commit 873f19d
Show file tree
Hide file tree
Showing 9 changed files with 170 additions and 7 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.0
Version: 3.5.1
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.0'
version = u'3.5.1'
# The full version, including alpha/beta/rc tags.
release = u'3.5.0'
release = u'3.5.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
Binary file added doc/images/foreign01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/usage/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
framework.rst
shinny_account.rst
mddatas.rst
kqd_symbol.rst
ta.rst
trade.rst
option_trade.rst
Expand Down
156 changes: 156 additions & 0 deletions doc/usage/kqd_symbol.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
.. _kqd_symbol:

外盘行情
==================================================
板块介绍
--------------------------------------------------
为了满足投资者对全球市场信息的需求,提供更全面、准确的投资决策支持,快期/天勤专业版上线了外盘行情(延时15分钟)

在快期专业版总添加方式:【添加板块】 - 【系统报价表】 - 【外盘行情(延时)】

.. figure:: /images/foreign01.png

在 TqSdk 中,您可以使用 :py:class:`~tqsdk.TqApi.query_quotes` 函数来获取对应的外盘合约列表,然后再安装自己的需求获取对应合约


合约展示
--------------------------------------------------
目前提供了纽约NYMEX、纽约COMEX、芝加哥CBOT、芝加哥CME、芝加哥CFE、美国NYBOT、欧洲EUREX、伦敦LME、香港HKFE、新加坡SGX 等多家交易所的主连合约行情

+------------------+---------------------+
| 合约代码 | 合约名 |
+==================+=====================+
| [email protected] | 离岸人民币主连 |
+------------------+---------------------+
| [email protected] | 英镑主连 |
+------------------+---------------------+
| [email protected] | 中国A50主连 |
+------------------+---------------------+
| [email protected] | 微原油主连 |
+------------------+---------------------+
| [email protected] | 迷你罗素主连 |
+------------------+---------------------+
| [email protected] | 美燃油主连 |
+------------------+---------------------+
| [email protected] | 瑞郎主连 |
+------------------+---------------------+
| [email protected] | 伦铝主连 |
+------------------+---------------------+
| [email protected] | 美原油主连 |
+------------------+---------------------+
| [email protected] | 2年美债主连 |
+------------------+---------------------+
| [email protected] | 加元主连 |
+------------------+---------------------+
| [email protected] | 伦锡主连 |
+------------------+---------------------+
| [email protected] | 新西兰元主连 |
+------------------+---------------------+
| [email protected] | H股指主连 |
+------------------+---------------------+
| [email protected] | 美麦主连 |
+------------------+---------------------+
| [email protected] | VIX指数主连 |
+------------------+---------------------+
| [email protected] | KC小麦主连 |
+------------------+---------------------+
| [email protected] | 微纳指主连 |
+------------------+---------------------+
| [email protected] | 10年德债主连 |
+------------------+---------------------+
| [email protected] | 微道指主连 |
+------------------+---------------------+
| [email protected] | 小天然气主连 |
+------------------+---------------------+
| [email protected] | A50主连 |
+------------------+---------------------+
| [email protected] | 伦铅主连 |
+------------------+---------------------+
| [email protected] | 微标普主连 |
+------------------+---------------------+
| [email protected] | 小H股指主连 |
+------------------+---------------------+
| [email protected] | 微罗素主连 |
+------------------+---------------------+
| [email protected] | 美黄金主连 |
+------------------+---------------------+
| [email protected] | 5年美债主连 |
+------------------+---------------------+
| [email protected] | 迷你美元主连 |
+------------------+---------------------+
| [email protected] | 小原油主连 |
+------------------+---------------------+
| [email protected] | 10年美债主连 |
+------------------+---------------------+
| [email protected] | 美精铜主连 |
+------------------+---------------------+
| [email protected] | 小恒指主连 |
+------------------+---------------------+
| [email protected] | 美黄豆主连 |
+------------------+---------------------+
| [email protected] | TSR20橡胶主连 |
+------------------+---------------------+
| [email protected] | 伦锌主连 |
+------------------+---------------------+
| [email protected] | 美元指主连 |
+------------------+---------------------+
| [email protected] | 美豆粕主连 |
+------------------+---------------------+
| [email protected] | 美棉花主连 |
+------------------+---------------------+
| [email protected] | 2年德债主连 |
+------------------+---------------------+
| [email protected] | 恒指主连 |
+------------------+---------------------+
| [email protected] | 澳元主连 |
+------------------+---------------------+
| [email protected] | 长期美债主连 |
+------------------+---------------------+
| [email protected] | 美白银主连 |
+------------------+---------------------+
| [email protected] | 伦铜主连 |
+------------------+---------------------+
| [email protected] | 5年德债主连 |
+------------------+---------------------+
| [email protected] | 德国DAX主连 |
+------------------+---------------------+
| [email protected] | 天然气主连 |
+------------------+---------------------+
| [email protected] | 微黄金主连 |
+------------------+---------------------+
| [email protected] | 美豆油主连 |
+------------------+---------------------+
| [email protected] | 迷你纳指主连 |
+------------------+---------------------+
| [email protected] | CME日经主连 |
+------------------+---------------------+
| [email protected] | 美元人民币主连 |
+------------------+---------------------+
| [email protected] | 日元主连 |
+------------------+---------------------+
| [email protected] | 美玉米主连 |
+------------------+---------------------+
| [email protected] | 铁矿FE主连 |
+------------------+---------------------+
| [email protected] | 迷你标普主连 |
+------------------+---------------------+
| [email protected] | 迷你德指主连 |
+------------------+---------------------+
| [email protected] | 迷你道指主连 |
+------------------+---------------------+
| [email protected] | 伦镍主连 |
+------------------+---------------------+
| [email protected] | 微白银主连 |
+------------------+---------------------+
| [email protected] | 欧元主连 |
+------------------+---------------------+
| [email protected] | 美汽油主连 |
+------------------+---------------------+
| [email protected] | 美钯金主连 |
+------------------+---------------------+
| [email protected] | 美铂金主连 |
+------------------+---------------------+
| [email protected] | 欧洲50指主连 |
+------------------+---------------------+


8 changes: 7 additions & 1 deletion doc/version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

版本变更
=============================
3.5.1 (2024/01/24)

* 修复::py:meth:`~tqsdk.TqApi.query_his_cont_quotes` 接口在 3.4.11、3.5.0 版本上报错的问题
* doc:增加外盘文档说明


3.5.0 (2024/01/18)

* 新增:行情增加外盘主连合约,通过 ``api.query_quotes(exchange_id=['KQD'])`` 查询外盘合约
* 新增:行情增加外盘主连合约,通过 ``api.query_quotes(exchange_id=['KQD'])`` 查询外盘合约,外盘合约地址参考 :ref:`kqd_symbol`
* 新增::py:meth:`~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.0",
version="3.5.1",
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.0'
__version__ = '3.5.1'
2 changes: 1 addition & 1 deletion tqsdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ def query_his_cont_quotes(self, symbol: Union[str, List[str]], n: int = 200) ->
end_dt = _timestamp_nano_to_datetime(trading_day)
cont_calendar = TqContCalendar(start_dt=(end_dt - timedelta(days=n * 2 + 30)).date(), end_dt=end_dt.date(),
symbols=symbols, headers=self._base_headers)
df = cont_calendar.df.loc[cont_calendar.df.date.le(end_dt), ['date'] + symbols]
df = cont_calendar.df.loc[cont_calendar.df._cst_date.le(end_dt), ['date'] + symbols]
df = df.iloc[-n:]
df.reset_index(inplace=True, drop=True)
return df
Expand Down

0 comments on commit 873f19d

Please sign in to comment.