ffdata 0.2.7__tar.gz → 0.2.8__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.
- {ffdata-0.2.7 → ffdata-0.2.8}/PKG-INFO +1 -1
- {ffdata-0.2.7 → ffdata-0.2.8}/pyproject.toml +1 -1
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata/__init__.py +6 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata/client.py +32 -2
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata.egg-info/PKG-INFO +1 -1
- {ffdata-0.2.7 → ffdata-0.2.8}/README.md +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/scripts/configure_ffdata.sh +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/setup.cfg +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata/cli.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata/datasets/__init__.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata/datasets/manager.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata/local/__init__.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata/local/store.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata/transport/__init__.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata/transport/http.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata.egg-info/SOURCES.txt +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata.egg-info/dependency_links.txt +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata.egg-info/entry_points.txt +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata.egg-info/requires.txt +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata.egg-info/top_level.txt +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata_common/__init__.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata_common/codecs/__init__.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata_common/codecs/arrow.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata_common/errors.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata_common/protocol.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata_common/schemas/__init__.py +0 -0
- {ffdata-0.2.7 → ffdata-0.2.8}/src/ffdata_common/schemas/manifest.py +0 -0
|
@@ -152,6 +152,11 @@ def fund_stock_portfolio(*args: Any, **kwargs: Any):
|
|
|
152
152
|
return _client().fund_stock_portfolio(*args, **kwargs)
|
|
153
153
|
|
|
154
154
|
|
|
155
|
+
def sge_daily(*args: Any, **kwargs: Any):
|
|
156
|
+
"""通过默认客户端查询上海黄金交易所现货日行情(20 列,前 14 列对齐 Tushare)。"""
|
|
157
|
+
return _client().sge_daily(*args, **kwargs)
|
|
158
|
+
|
|
159
|
+
|
|
155
160
|
def macro_indicator_basic(*args: Any, **kwargs: Any):
|
|
156
161
|
return _client().macro_indicator_basic(*args, **kwargs)
|
|
157
162
|
|
|
@@ -194,6 +199,7 @@ __all__ = [
|
|
|
194
199
|
"macro_indicator_basic",
|
|
195
200
|
"macro_indicator_data",
|
|
196
201
|
"query",
|
|
202
|
+
"sge_daily",
|
|
197
203
|
"sql_query",
|
|
198
204
|
"set_token",
|
|
199
205
|
"stock_adjusting_factor",
|
|
@@ -489,8 +489,9 @@ class Client:
|
|
|
489
489
|
或纯代码(服务端剥离后缀后匹配,并校验后缀与交易所一致);``index_code``
|
|
490
490
|
是跟踪目标代码,可能是指数,也可能是现货/商品标的;``list_status`` 取
|
|
491
491
|
``L``/``D``/``P``;``exchange`` 取 ``SH``/``SZ``;``mgr`` 按管理人简称
|
|
492
|
-
模糊匹配;``csrc_category`` 按证监会分类中文名称等值过滤。返回
|
|
493
|
-
``index_inner_code
|
|
492
|
+
模糊匹配;``csrc_category`` 按证监会分类中文名称等值过滤。返回 21 列,其中 ``inner_code``(ETF 聚源内码)、
|
|
493
|
+
``index_inner_code``(跟踪目标聚源内码)、``track_asset_type``(跟踪资产类型)
|
|
494
|
+
与 ``track_asset_category``(原始类别编码)是 ffdata 扩展字段;不传任何过滤
|
|
494
495
|
条件时返回全部沪深上市 ETF。本接口仅支持远程查询。
|
|
495
496
|
"""
|
|
496
497
|
return self.query(
|
|
@@ -585,6 +586,35 @@ class Client:
|
|
|
585
586
|
fields=fields,
|
|
586
587
|
)
|
|
587
588
|
|
|
589
|
+
def sge_daily(
|
|
590
|
+
self,
|
|
591
|
+
*,
|
|
592
|
+
ts_code: str | list[str] | None = None,
|
|
593
|
+
trade_date: Any = None,
|
|
594
|
+
start_date: Any = None,
|
|
595
|
+
end_date: Any = None,
|
|
596
|
+
date_type: int = 3,
|
|
597
|
+
fields: list[str] | None = None,
|
|
598
|
+
) -> pd.DataFrame:
|
|
599
|
+
"""查询上海黄金交易所现货日行情(20 列,前 14 列对齐 Tushare ``sge_daily``)。
|
|
600
|
+
|
|
601
|
+
``ts_code`` 为聚源现货合约代码原值(如 ``Au99.99``、``Au(T+D)``、``iAu99.99``),
|
|
602
|
+
**不带市场后缀**,支持列表与逗号分隔;``trade_date`` 与 ``start_date``/
|
|
603
|
+
``end_date`` 互斥,且至少需要 ``ts_code`` 或 ``trade_date`` 之一。
|
|
604
|
+
``date_type`` 默认 ``3``(日,与 Tushare 一致),``4`` 为聚源周频扩展。
|
|
605
|
+
价格元/克、``vol`` 千克、``amount`` 元、``pct_change`` 为百分数;``change`` 与
|
|
606
|
+
``pct_change`` 为聚源原值(两者比较基准不同,见接口文档)。
|
|
607
|
+
"""
|
|
608
|
+
return self.query(
|
|
609
|
+
"sge_daily",
|
|
610
|
+
ts_code=ts_code,
|
|
611
|
+
trade_date=trade_date,
|
|
612
|
+
start_date=start_date,
|
|
613
|
+
end_date=end_date,
|
|
614
|
+
date_type=date_type,
|
|
615
|
+
fields=fields,
|
|
616
|
+
)
|
|
617
|
+
|
|
588
618
|
def cb_daily(
|
|
589
619
|
self,
|
|
590
620
|
*,
|
|
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
|