Skip to content

Commit ddf8aa4

Browse files
committed
Merge branch 'fix_contract_util' into 'dev'
Fix contract util See merge request server/openapi/openapi-python-sdk!151
2 parents d923c0c + c0235fd commit ddf8aa4

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.2.8 (2023-02-03)
2+
### Fix
3+
- 修复期权合约四要素解析工具无法处理部分港股期权的问题
4+
5+
16
## 2.2.7 (2023-01-11)
27
### New
38
- 支持配置日志路径

tigeropen/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
55
@author: gaoan
66
"""
7-
__VERSION__ = '2.2.7'
7+
__VERSION__ = '2.2.8'

tigeropen/common/util/contract_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def extract_option_info(identifier):
6666
:return:
6767
"""
6868
if identifier:
69-
tokens = re.findall(r'(\w+)\s*(\d{6})([CP])(\d+)', identifier, re.M)
69+
tokens = re.findall(r'(\w+(?:\.\w+)?)\s*(\d{6})([CP])(\d+)', identifier, re.M)
7070
if len(tokens) == 1:
7171
underlying_symbol, expiry, put_call, strike = tokens[0]
7272
expiry = '20' + expiry

0 commit comments

Comments
 (0)