skills/tushare-data-1.0.5/references/数据接口/期货数据/期货主力与连续合约.md
wangyitong a65adcc2e5 Initial commit: merged, deduplicated, and vetted skill collection
Sources: extracted from two upstream archives (skill-repo, skills-main),
merged with the following policy:

- 15 broken symlinks (pointing to /Users/jameslee/.cc-switch/skills or
  ../../.agents/skills on a foreign machine) discarded
- 3 real name collisions with identical content (ai-pair, ifind-http-api,
  zhipu-websearch) kept as one copy
- Functional overlaps deduped keeping the strongest variant:
  - docx family: kept docx (official, full toolchain) + docx-cn
    (GB/T 9704 Chinese official-document constants),
    dropped docx_writer (no scripts, name collided with docx)
  - humanizer family: kept humanizer-zh (6 zh reference docs),
    dropped humanizer (en, redundant for CN workflow)
- Skills that only ran in a foreign environment removed:
  ablemind-ops, app-publish, hlb-design-system, openclaw-adj-skill,
  claude-driver
- alphapai excluded from this public repo because its SKILL.md hard-coded
  live credentials

Result: 25 skills, 572 files, ~7.5 MB.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 14:47:12 +08:00

76 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 期货主力与连续合约
----
接口fut_mapping
描述:获取期货主力(或连续)合约与月合约映射数据
限量单次最大2000条总量不限制
积分用户需要至少2000积分才可以调取未来可能调整积分请尽可能多积累积分。具体请参阅[积分获取办法](https://tushare.pro/document/1?doc_id=13)
<br>
<br>
**输入参数**
名称 | 类型 | 必选 | 描述
---- | ----- | ---- | ----
ts_code | str | N | 合约代码
trade_date | str | N | 交易日期(YYYYMMDD格式下同)
start_date | str | N | 开始日期
end_date | str | N | 结束日期
<br>
<br>
**输出参数**
名称 | 类型 | 默认显示 | 描述
--- | ---- | ---- | ----
ts_code | str | Y | 连续合约代码
trade_date | str | Y | 起始日期
mapping_ts_code | str | Y | 期货合约代码
<br>
<br>
**接口示例**
```python
pro = ts.pro_api()
#获取主力合约TF.CFX每日对应的月合约
df = pro.fut_mapping(ts_code='TF.CFX')
```
<br>
<br>
**数据示例**
ts_code trade_date mapping_ts_code
0 TF.CFX 20190823 TF1912.CFX
1 TF.CFX 20190822 TF1912.CFX
2 TF.CFX 20190821 TF1912.CFX
3 TF.CFX 20190820 TF1912.CFX
4 TF.CFX 20190819 TF1912.CFX
5 TF.CFX 20190816 TF1912.CFX
6 TF.CFX 20190815 TF1912.CFX
7 TF.CFX 20190814 TF1912.CFX
8 TF.CFX 20190813 TF1912.CFX
9 TF.CFX 20190812 TF1909.CFX
10 TF.CFX 20190809 TF1909.CFX
11 TF.CFX 20190808 TF1909.CFX
12 TF.CFX 20190807 TF1909.CFX
13 TF.CFX 20190806 TF1909.CFX
14 TF.CFX 20190805 TF1909.CFX
15 TF.CFX 20190802 TF1909.CFX
16 TF.CFX 20190801 TF1909.CFX
17 TF.CFX 20190731 TF1909.CFX
18 TF.CFX 20190730 TF1909.CFX
19 TF.CFX 20190729 TF1909.CFX
20 TF.CFX 20190726 TF1909.CFX