xtquant-share 1.2.25__tar.gz → 1.2.27__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xtquant_share-1.2.25/xtquant_share.egg-info → xtquant_share-1.2.27}/PKG-INFO +1 -1
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/pyproject.toml +1 -1
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/tests/test_remote_data.py +10 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/__init__.py +1 -1
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/auth.py +3 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/client.py +5 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/server.py +6 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27/xtquant_share.egg-info}/PKG-INFO +1 -1
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/LICENSE +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/README.md +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/setup.cfg +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/tests/test_auth.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/tests/test_client.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/tests/test_client_permission.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/tests/test_integration.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/tests/test_server.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/tests/test_server_permission.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/tests/test_tools_common.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/.env.example +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/check_env.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/clients.yaml.example +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/qmt_datadir/__init__.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/qmt_datadir/divid.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/qmt_datadir/kline.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/qmt_datadir/misc.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/qmt_datadir/reader.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/qmt_datadir/sector.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/qmt_watchdog.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/tools/__init__.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/tools/common.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/tools/xtdata.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xqshare/tools/xttrader.py +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xtquant_share.egg-info/SOURCES.txt +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xtquant_share.egg-info/dependency_links.txt +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xtquant_share.egg-info/entry_points.txt +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xtquant_share.egg-info/requires.txt +0 -0
- {xtquant_share-1.2.25 → xtquant_share-1.2.27}/xtquant_share.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "xtquant-share"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.27"
|
|
8
8
|
description = "Xtreme Quant Share - eXtreme transparent sharing proxy for XtQuant on macOS/Linux"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "GPL-3.0-only"
|
|
@@ -129,6 +129,16 @@ class TestRemoteDataGet:
|
|
|
129
129
|
assert dates is not None
|
|
130
130
|
assert len(dates) > 0
|
|
131
131
|
|
|
132
|
+
def test_get_holidays(self, remote_client):
|
|
133
|
+
"""测试获取节假日列表
|
|
134
|
+
|
|
135
|
+
注:get_holidays() 返回结果依赖 QMT 本地数据环境,
|
|
136
|
+
某些券商版本或无数据缓存时可能返回空列表,因此只校验类型。
|
|
137
|
+
"""
|
|
138
|
+
holidays = remote_client.xtdata.get_holidays()
|
|
139
|
+
assert holidays is not None
|
|
140
|
+
assert isinstance(holidays, list)
|
|
141
|
+
|
|
132
142
|
|
|
133
143
|
# ────────────────────────────────────────────────────────────
|
|
134
144
|
# 数据下载测试
|
|
@@ -51,6 +51,8 @@ API_PERMISSIONS: Dict[str, Permission] = {
|
|
|
51
51
|
"xtdata.get_divid_factors": Permission.BASIC,
|
|
52
52
|
"xtdata.get_sector_list": Permission.BASIC,
|
|
53
53
|
"xtdata.get_trading_calendar": Permission.BASIC,
|
|
54
|
+
"xtdata.get_holidays": Permission.BASIC,
|
|
55
|
+
"xtdata.get_ipo_info": Permission.BASIC,
|
|
54
56
|
"get_all_stocks": Permission.BASIC,
|
|
55
57
|
"get_index_list": Permission.BASIC,
|
|
56
58
|
|
|
@@ -63,6 +65,7 @@ API_PERMISSIONS: Dict[str, Permission] = {
|
|
|
63
65
|
"xtdata.download_history_data": Permission.DAILY,
|
|
64
66
|
"xtdata.download_history_data2": Permission.DAILY,
|
|
65
67
|
"download_history_data2": Permission.DAILY,
|
|
68
|
+
"xtdata.download_sector_data": Permission.DAILY,
|
|
66
69
|
|
|
67
70
|
# ==================== minute 权限 ====================
|
|
68
71
|
"xtdata.get_financial_data": Permission.MINUTE,
|
|
@@ -619,6 +619,11 @@ class XtQuantRemote:
|
|
|
619
619
|
self._ensure_connected()
|
|
620
620
|
return self._conn.root.download_history_data2(stock_list, period, start_time, end_time, incrementally)
|
|
621
621
|
|
|
622
|
+
def download_sector_data(self):
|
|
623
|
+
"""下载行业板块数据"""
|
|
624
|
+
self._ensure_connected()
|
|
625
|
+
return self._conn.root.download_sector_data()
|
|
626
|
+
|
|
622
627
|
def is_connected(self):
|
|
623
628
|
return self._connected
|
|
624
629
|
|
|
@@ -723,6 +723,12 @@ class XtQuantService(rpyc.Service):
|
|
|
723
723
|
self._require_auth()
|
|
724
724
|
return self._xtdata.get_stock_list_in_sector("沪深指数")
|
|
725
725
|
|
|
726
|
+
@log_api_call("download_sector_data")
|
|
727
|
+
def exposed_download_sector_data(self):
|
|
728
|
+
"""下载行业板块数据"""
|
|
729
|
+
self._require_auth()
|
|
730
|
+
return self._xtdata.download_sector_data()
|
|
731
|
+
|
|
726
732
|
# ==================== 服务端封装接口 ====================
|
|
727
733
|
|
|
728
734
|
@log_api_call("download_history_data2")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|