Skip to content

Commit

Permalink
Update Version 3.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
shinny-pack authored and shinny-mayanqiong committed Mar 9, 2022
1 parent a9497b2 commit 574f509
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 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.2.5
Version: 3.2.6
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.2.5'
version = u'3.2.6'
# The full version, including alpha/beta/rc tags.
release = u'3.2.5'
release = u'3.2.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
5 changes: 5 additions & 0 deletions doc/version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

版本变更
=============================
3.2.6 (2022/03/09)

* 修复:修正深交所 ETF 期权的昨结算(pre_settlement)字段未正确显示的问题


3.2.5 (2022/03/09)

* 修复:修正上交所 ETF 期权的昨结算(pre_settlement)字段未正确显示的问题
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_tag(self):

setuptools.setup(
name='tqsdk',
version="3.2.5",
version="3.2.6",
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.2.5'
__version__ = '3.2.6'
8 changes: 4 additions & 4 deletions tqsdk/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async def _run(self, api, sim_send_chan, sim_recv_chan, md_send_chan, md_recv_ch
self._sim_recv_chan = sim_recv_chan
self._md_send_chan = md_send_chan
self._md_recv_chan = md_recv_chan
self._sse_options = set()
self._etf_options = set()
self._quotes_all_keys = set(Quote(None).keys())
self._quotes_all_keys = self._quotes_all_keys.union({'margin', 'commission'})
# 以下字段合约服务也会请求,但是不应该记在 quotes 中,quotes 中的这些字段应该有行情服务负责
Expand All @@ -42,8 +42,8 @@ async def _run(self, api, sim_send_chan, sim_recv_chan, md_send_chan, md_recv_ch
elif query_id.startswith("PYSDK_quote"):
quotes = self._api._symbols_to_quotes(query_result, self._quotes_all_keys)
for quote in quotes.values():
if quote["ins_class"] == "OPTION" and quote["exchange_id"] == "SSE":
self._sse_options.add(quote["instrument_id"])
if quote["ins_class"] == "OPTION" and quote["exchange_id"] in ["SSE", "SZSE"]:
self._etf_options.add(quote["instrument_id"])
else:
# quotes 中的 pre_settlement 字段应该由行情服务负责,行情没有上交所期权的 pre_settlement,需要从合约服务取,其他合约不变
quote.pop("pre_settlement", None)
Expand All @@ -55,7 +55,7 @@ async def _run(self, api, sim_send_chan, sim_recv_chan, md_send_chan, md_recv_ch
})
for d in data:
for symbol, quote in d.get("quotes", {}).items():
if symbol in self._sse_options:
if symbol in self._etf_options:
quote.pop("pre_settlement", None)
data.append({"quotes": updated_quotes})
await self._sim_recv_chan.send(pack)
Expand Down

0 comments on commit 574f509

Please sign in to comment.