Skip to content

Commit f037238

Browse files
committed
Merge branch 'master' into feat_refactor_test
2 parents 17a4ad6 + a483c39 commit f037238

File tree

6 files changed

+23
-4
lines changed

6 files changed

+23
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.4.4 (2025-07-31)
2+
### New
3+
选股器支持分页 cursor_id 参数
4+
15
## 3.4.3 (2025-07-22)
26
### Fix
37
下单返回 orders 属性处理

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__ = '3.4.3'
7+
__VERSION__ = '3.4.4'

tigeropen/quote/domain/filter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def __repr__(self):
154154

155155

156156
class ScannerResult:
157-
def __init__(self, page, page_size, total_page, total_count, items):
157+
def __init__(self, page, page_size, total_page, total_count, items, cursor_id=None):
158158
"""
159159
{'page': 0, 'total_page': 668, 'total_count': 6678, 'page_size': 10,
160160
'items': [
@@ -175,6 +175,7 @@ def __init__(self, page, page_size, total_page, total_count, items):
175175
self.total_page = total_page
176176
self.total_count = total_count
177177
self.page_size = page_size
178+
self.cursor_id = cursor_id
178179
self.items = list()
179180
self.symbols = list()
180181
self._build_items(items)

tigeropen/quote/quote_client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,8 +2366,9 @@ def market_scanner(self,
23662366
filters: Optional[List['StockFilter']] = None,
23672367
sort_field_data: Optional[Union['SortFilterData',
23682368
Dict[str, Any]]] = None,
2369-
page: int = 0,
2370-
page_size: int = 100) -> 'ScannerResult':
2369+
page: Optional[int] = 0,
2370+
page_size: Optional[int] = 100,
2371+
cursor_id: Optional[str] = None) -> 'ScannerResult':
23712372
"""
23722373
Screen stocks with filtering conditions and sort options. 按条件筛选和排序股票
23732374
@@ -2434,6 +2435,7 @@ def market_scanner(self,
24342435
params.sort_field_data = sort_field_data
24352436
params.page = page
24362437
params.page_size = page_size
2438+
params.cursor_id = cursor_id
24372439
request = OpenApiRequest(MARKET_SCANNER, biz_model=params)
24382440
response_content = self.__fetch_data(request)
24392441
if response_content:

tigeropen/quote/request/model.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,7 @@ def __init__(self):
956956
self._page = None
957957
self._page_size = None
958958
self._multi_tags_fields = None
959+
self._cursor_id = None
959960

960961
@property
961962
def market(self):
@@ -1029,6 +1030,14 @@ def multi_tags_fields(self):
10291030
def multi_tags_fields(self, value):
10301031
self._multi_tags_fields = value
10311032

1033+
@property
1034+
def cursor_id(self):
1035+
return self._cursor_id
1036+
1037+
@cursor_id.setter
1038+
def cursor_id(self, value):
1039+
self._cursor_id = value
1040+
10321041
def to_openapi_dict(self):
10331042
"""
10341043
example
@@ -1064,6 +1073,8 @@ def to_openapi_dict(self):
10641073
params['page'] = self.page
10651074
if self.page_size is not None:
10661075
params['page_size'] = self.page_size
1076+
if self.cursor_id is not None:
1077+
params['cursor_id'] = self.cursor_id
10671078
if self.multi_tags_fields:
10681079
params['multi_tag_field_list'] = [f.field_request_name for f in self.multi_tags_fields]
10691080
return params

tigeropen/quote/response/market_scanner_response.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def parse_response_content(self, response_content):
2525
page_size=data.get('page_size'),
2626
total_page=data.get('total_page'),
2727
total_count=data.get('total_count'),
28+
cursor_id=data.get('cursor_id'),
2829
items=data.get('items'))
2930
return self.result
3031

0 commit comments

Comments
 (0)