futures-dominant-mapping

futures-dominant-mapping is a skill for Claude Code, Codex from FTShare-Lab/FTShare-skill. It costs 96 tokens per session (1,268 once invoked), scanned A, original, MIT.

A lookup that maps each futures product to its main contract on a specified trading date. A main contract is the currently used futures contract for a product under a defined exchange rule.

In plain words
What is it for?
Use it to find the main contract code for futures products across supported Chinese exchanges on a given trading day. It also supports selecting a mapping-rule version.
Why use it?
It avoids guessing which real contract a continuous or main-contract symbol represents, especially when contracts change during rollover.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to find the main contract code for futures products across supported Chinese exchanges on a given trading day. It also supports selecting a mapping-rule version.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ftshare-lab/ftshare-skill/futures-dominant-mapping
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add FTShare-Lab/FTShare-skill --skill futures-dominant-mapping
Clone the repo
git clone --depth 1 https://github.com/FTShare-Lab/FTShare-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for futures-dominant-mapping

README.md
[![agentmods](https://agentmods.dev/badge/skills/ftshare-lab/ftshare-skill/futures-dominant-mapping/github.svg)](https://agentmods.dev/skills/ftshare-lab/ftshare-skill/futures-dominant-mapping)
Your own site
<a href="https://agentmods.dev/skills/ftshare-lab/ftshare-skill/futures-dominant-mapping"><img src="https://agentmods.dev/badge/skills/ftshare-lab/ftshare-skill/futures-dominant-mapping/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for futures-dominant-mapping

Your own site · 80×15
<a href="https://agentmods.dev/skills/ftshare-lab/ftshare-skill/futures-dominant-mapping"><img src="https://agentmods.dev/badge/skills/ftshare-lab/ftshare-skill/futures-dominant-mapping.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,268 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00096 $0.01268
Opus 5.5 $0.00038 $0.00507
Sonnet 5.5 $0.00019 $0.00254
Haiku 4.5 $0.00010 $0.00127

Measured 7d ago against content hash 4ecb03735b69, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

futures-dominant-mapping scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/handler.py, scripts/test_handler.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ftshare-market-data/sub-skills/futures-dominant-mapping/SKILL.md · 88 lines

What it actually says

期货主力合约映射

接口:GET /api/v1/market/data/futures/dominant-mapping。

接口说明

项目 说明
接口名称 期货主力合约映射
外部接口 /api/v1/market/data/futures/dominant-mapping
请求方式 GET
适用场景 查询某生效交易日各交易所、各期货品种对应的主力合约代码
数据范围 按交易日查询;v1/v2/v3/v4 各交易所起始日不同:DCE 20000508、SHFE 20020107、CFFEX 20100416、CZCE 20150921、INE 20180326、GFEX 20221222
更新频率 每晚 18:10 更新 T+1 数据

请求参数

参数名 类型 是否必填 描述 取值示例
trade_date string 是 主力映射生效交易日,格式 YYYYMMDD 20261123
rule_version string 否 主力规则版本:v1、v2、v3、v4,区分大小写;省略或传空值默认 v1,传入不支持的版本返回空数组 v2

执行方式

通过根目录的 run.py 调用(推荐):

# 查询某日主力映射(默认 v1 规则)
python <RUN_PY> futures-dominant-mapping --trade-date 20261123

# 指定规则版本
python <RUN_PY> futures-dominant-mapping --trade-date 20261123 --rule-version v4

# 只看某个交易所或品种的组合,可用 jq 过滤
python <RUN_PY> futures-dominant-mapping --trade-date 20261123 | jq '.data[] | select(.exchange == "CFFEX")'

<RUN_PY> 为主 SKILL.md 同级的 run.py 绝对路径,参见主 SKILL.md 的「调用方式」说明。

响应结构

data 为主力映射数组,不分页;无匹配记录时为空数组:

{
    "code": 200,
    "message": "success",
    "data": [
        {
            "trade_date": "20261123",
            "exchange": "CFFEX",
            "variety": "IF",
            "dominant_symbol": "IF2612",
            "rule_version": "v1"
        },
        {
            "trade_date": "20261123",
            "exchange": "CZCE",
            "variety": "AP",
            "dominant_symbol": "AP2701",
            "rule_version": "v1"
        }
    ]
}

data 元素字段说明

字段名 类型 是否可为空 说明
trade_date string 否 主力映射生效交易日,YYYYMMDD
exchange string 否 交易所代码,例如 CFFEX、CZCE、SHFE、INE、GFEX、DCE
variety string 否 期货品种代码,例如 IF、CU、AP、EC
dominant_symbol string 否 当日实际主力合约代码,按交易所官网口径返回:CZCE、CFFEX 大写,SHFE、INE、DCE、GFEX 小写;CZCE 为四位年份格式
rule_version string 否 本条记录采用的主力规则版本

注意事项

  • trade_date 必填,且必须是有效日期;接口按生效交易日查询,通常使用 T 日收盘后数据决定 T+1 日生效的主力映射。
  • 不同规则版本的换月逻辑不同:v1 按前一交易日量仓排名、不限方向换月;v2 只向远月换月且要求持仓量超过当前主力 1.1 倍;v3 只向远月换月但无 1.1 倍阈值;v4 对 CFFEX 股指期货每月重排、无 1.1 倍阈值。
  • 查询无匹配记录或传入不支持的 rule_version 时仍返回成功响应,data 为空数组,不是报错。
  • 同一交易日的记录条数随规则版本和可用品种变化,调用方不要按固定条数解析。
  • 主力合约是期货代码,可直接传给 futures-daily-kline、futures-kline 等按 symbol 查询的接口。
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 88 lines · 96 tokens per session scan A 4ecb03735b69

Subscribe to this mod's changes

futures-dominant-mapping is a skill published in the GitHub repository FTShare-Lab/FTShare-skill (65 stars, last pushed 7d ago), licensed MIT. It adds 96 tokens to every session and 1,268 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-25.

Related

futures-dominant-mapping compared with skills from other repositories

futures-dominant-mapping next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
futures-dominant-mappingFTShare-Lab/FTShare-skillSkill657d agoMITA96Claude Code, Codex
tickdb-market-dataTickDB/tickdb-unified-realtime-marketdata-apiSkill95025d agoMITA165Claude Code, Codex
defeatbeta-earnings-analysisdefeat-beta/defeatbeta-apiSkill81221d agoApache-2.0A112Claude Code
bprrwilsonfreitas/awesome-quantSkill31ktodaynoneA36Claude Code, Codex
create-entrywilsonfreitas/awesome-quantSkill31ktodaynoneA43Claude Code, Codex
update-pypi-dateswilsonfreitas/awesome-quantSkill31ktodaynoneA47Claude Code, Codex
defeatbeta-earnings-previewdefeat-beta/defeatbeta-apiSkill81221d agoApache-2.0A60Claude Code, Codex