原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。原型 · 每 30 分钟更新
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

tqsdk-python Skill

代码仓库 ↗

作者:shinnytech★ 5,1441 个 skill

安装

What it does

天勤量化开发包, 期货量化, 实时行情/历史数据/实盘交易

  • Connects Instruction files the AI reads
  • Account or key Not confirmed yet (README not read yet)
  • Category 写代码
给作者:在 README 中加徽章

如果你是作者,可把这段代码贴到 README。徽章会链接回本页。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/skill/shinnytech-tqsdk-python.svg)](https://mcp.popnx.com/en/skills/shinnytech-tqsdk-python)

可搭配使用

在同一工作中把 AI 连到服务的 MCP

REA

Reverse engineer anything from your terminal or agent with one CLI and MCP server.

作者:morluto广泛使用↓ 38.9万/周★ 46.2万5天前更新

MCP · 连接服务在你的电脑上运行

Fallow

Codebase intelligence for TypeScript and JavaScript, exposed as structured MCP analysis tools.

作者:fallow-rs广泛使用↓ 244.1万/周★ 5374今天更新

MCP · 连接服务在你的电脑上运行

Desktop Commander

MCP server for terminal commands, file operations, and process management

作者:wonderwhy-er广泛使用↓ 74万/周★ 1万5天前更新

MCP · 连接服务在你的电脑上运行

相似的 Skill

同类工作,排序与 Skill 列表相同

与相似项目对比
本项
tqsdk-python
reaandrej-karpathy-skillsgraphifyMoneyPrinterTurbo
作者shinnytechmorlutomultica-aiGraphify-Labsharry0703
Skill 数11111
GitHub 星标5,144463,670233,682148,887143,987
最近代码更新2026年10月26日2026年11月17日2026年4月20日2026年11月17日2026年11月16日
许可证Apache-2.0MIT–Apache-2.0MIT

shinnytech 提供的 1 个 Skill(指令集),AI 读取后照做 · 不是 MCP server

Skill 和 MCP 有什么不同

MCP = 手

把 AI 连到外部服务或数据,例如读取 Notion 或开发票。需要有程序或服务器在运行。

Skill = 手册

教 AI 怎么做某项工作的文本文件,不连接任何服务。

有些会重叠:少数 Skill 带有调用工具的脚本,少数 MCP 只提供知识。请从你想完成的工作出发。

适用的应用

Codex

依据开发者 README 和 repo 中的文件夹

安装

Is it safe?

  • Who made it

    GitHub account shinnytech (organization), 10 years old

  • Use and upkeep

    ★ 5,144 stars · code last changed 2026年10月26日

  • Any scripts?

    1 scripts that can run on a computer: scripts/check_environment.py

  • Uses the internet?

    No internet calls found in the scripts

  • Changes machine-wide settings?

    No hooks or writes to machine settings found

Checked automatically from the repo files at commit cde7f57 (read only, nothing was run). Not a safety guarantee: read it and decide for yourself

第一步:你用哪个 AI?

选择你用的应用,本页只显示该应用的安装方法

Option 1Upload to claude.ai (web and app)

  • Files are byte-for-byte the same as on GitHub at commit cde7f57 · View on GitHub ↗

  • 1 scripts

  • Once uploaded it runs on Claude’s systems, not on your computer. No need to unzip

Look inside before downloading

All 15 files · 81 KB

  • SKILL.md5 KB
  • agents/openai.yaml1 KB
  • references/account-type-matrix.md4 KB
  • references/accounts-and-trading.md5 KB
  • references/environment-setup.md4 KB
  • references/error-faq.md7 KB
  • references/example-map.md5 KB
  • references/market-data.md5 KB
  • references/object-fields.md7 KB
  • references/order-functions-and-position-tools.md10 KB
  • references/scenario-and-margin.md8 KB
  • references/simulation-and-backtest.md4 KB
  • references/wait-update-and-update-loop.md5 KB
  • scripts/check_environment.py2 KB
  • LICENSE11 KB
  1. Download tqsdk-trading-and-data.zip

    81 KB · 15 files · Apache-2.0 license (license file included in the folder)

    Download tqsdk-trading-and-data.zip

  2. Open Skills on claude.ai and upload

    +Create skillUpload a skillpick tqsdk-trading-and-data.zip

    Open claude.ai/customize/skills ↗

  3. No Upload button? Turn on file creation first

    SettingsCapabilitiesCode execution and file creation

    Turn on Code execution and file creation first (newer menus: Create and edit files) · personal plans: Settings → Capabilities · Team/Enterprise: an admin turns it on under Organization settings → Plugins & skills · every plan, including Free

Upload once; it works in claude.ai and Claude Desktop, and in recent Claude Code signed in with a Claude account (not with an API key)

Cowork and cloud sessions use the skills turned on in your claude.ai account, not ~/.claude/skills on your computer (Claude Desktop scheduled tasks run locally and still load it)

Checked against official docs 2026年11月12日 · Source: support.claude.com, support.claude.com, code.claude.com

Option 1让 Claude Code 帮你安装

复制这句话,粘贴到 Claude Code 的对话中

Where to install
Please install the skill tqsdk-trading-and-data from https://github.com/shinnytech/tqsdk-python folder doc/ai_editor/skills/tqsdk-trading-and-data (commit cde7f57) for all my projects, at ~/.claude/skills/tqsdk-trading-and-data. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill tqsdk-trading-and-data from https://github.com/shinnytech/tqsdk-python folder doc/ai_editor/skills/tqsdk-trading-and-data (commit cde7f57) into the project this chat is open in (at .claude/skills/tqsdk-trading-and-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

重新打开 Claude Code,输入 /tqsdk-trading-and-data,或直接提出相关任务,Claude 会自动选用

Checked against official docs 2026年11月12日 · Source: code.claude.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.claude/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/shinnytech/tqsdk-python.git /tmp/popnx-skill-shinnytech-tqsdk-python-cde7f57 && mkdir -p ~/.claude/skills && cp -R '/tmp/popnx-skill-shinnytech-tqsdk-python-cde7f57/doc/ai_editor/skills/tqsdk-trading-and-data' ~/.claude/skills/tqsdk-trading-and-data
  3. 重新打开 Claude Code,输入 /tqsdk-trading-and-data,或直接提出相关任务,Claude 会自动选用

自己安装的 Skill 可用于 ChatGPT 桌面应用、Codex CLI 和 IDE 中的 Codex 扩展 · 网页版和手机版 ChatGPT 不能使用自己安装的 Skill,只能使用目录中插件自带的 Skill

ChatGPT 桌面应用

ChatGPT 桌面应用内置 Codex,Codex 从 ~/.agents/skills 文件夹读取 Skill

Option 1让 ChatGPT 帮你安装

在 ChatGPT 桌面应用中打开 Codex,把这句话粘贴到对话中

Where to install
Please install the skill tqsdk-trading-and-data from https://github.com/shinnytech/tqsdk-python folder doc/ai_editor/skills/tqsdk-trading-and-data (commit cde7f57) for all my projects, at ~/.agents/skills/tqsdk-trading-and-data. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill tqsdk-trading-and-data from https://github.com/shinnytech/tqsdk-python folder doc/ai_editor/skills/tqsdk-trading-and-data (commit cde7f57) into the project this chat is open in (at .agents/skills/tqsdk-trading-and-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Option 2自己放入文件夹

把 tqsdk-trading-and-data 文件夹放到 ~/.agents/skills/tqsdk-trading-and-data

~ 是你的主文件夹($HOME)

不用终端:下载 ZIP,解压后把 tqsdk-trading-and-data 文件夹移到 ~/.agents/skills

下载 tqsdk-trading-and-data.zip

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.agents/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/shinnytech/tqsdk-python.git /tmp/popnx-skill-shinnytech-tqsdk-python-cde7f57 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-shinnytech-tqsdk-python-cde7f57/doc/ai_editor/skills/tqsdk-trading-and-data' ~/.agents/skills/tqsdk-trading-and-data

安装之后

  • ChatGPT 桌面应用:打开侧边栏中的 Skills,确认 Skill 已出现
  • 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称
  • Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

网页版和手机版 ChatGPT

不能使用你自己安装的 Skill,只能使用目录中插件自带的 Skill

想在 ChatGPT 中使用这个 Skill,请按上面的方法使用 ChatGPT 桌面应用

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

Option 1让 Codex 帮你安装

复制这句话,粘贴到 Codex 的对话中 · 适用于 ChatGPT 桌面应用中的 Codex、Codex CLI 和 IDE 扩展

Where to install
Please install the skill tqsdk-trading-and-data from https://github.com/shinnytech/tqsdk-python folder doc/ai_editor/skills/tqsdk-trading-and-data (commit cde7f57) for all my projects, at ~/.agents/skills/tqsdk-trading-and-data. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill tqsdk-trading-and-data from https://github.com/shinnytech/tqsdk-python folder doc/ai_editor/skills/tqsdk-trading-and-data (commit cde7f57) into the project this chat is open in (at .agents/skills/tqsdk-trading-and-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex · 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.agents/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/shinnytech/tqsdk-python.git /tmp/popnx-skill-shinnytech-tqsdk-python-cde7f57 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-shinnytech-tqsdk-python-cde7f57/doc/ai_editor/skills/tqsdk-trading-and-data' ~/.agents/skills/tqsdk-trading-and-data
  3. 重新打开 Codex 并提出相关任务,Codex 会列出这个 skill

Option 1让 Cursor 帮你安装

复制这句话,粘贴到 Cursor 的对话中

Where to install
Please install the skill tqsdk-trading-and-data from https://github.com/shinnytech/tqsdk-python folder doc/ai_editor/skills/tqsdk-trading-and-data (commit cde7f57) for all my projects, at ~/.cursor/skills/tqsdk-trading-and-data. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill tqsdk-trading-and-data from https://github.com/shinnytech/tqsdk-python folder doc/ai_editor/skills/tqsdk-trading-and-data (commit cde7f57) into the project this chat is open in (at .cursor/skills/tqsdk-trading-and-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

在 Cursor 的 Agent 聊天中输入 / 并选择 tqsdk-trading-and-data

Checked against official docs 2026年11月12日 · Source: cursor.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.cursor/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/shinnytech/tqsdk-python.git /tmp/popnx-skill-shinnytech-tqsdk-python-cde7f57 && mkdir -p ~/.cursor/skills && cp -R '/tmp/popnx-skill-shinnytech-tqsdk-python-cde7f57/doc/ai_editor/skills/tqsdk-trading-and-data' ~/.cursor/skills/tqsdk-trading-and-data
  3. 在 Cursor 的 Agent 聊天中输入 / 并选择 tqsdk-trading-and-data

Option 1Let the AI install it

适用于其他能读取 Skill 的应用。这句话列出了 Claude Code、Codex 和 Cursor 的路径,AI 会按你的应用选择 · Copy this sentence into the app’s chat

Where to install
Please install the skill tqsdk-trading-and-data from https://github.com/shinnytech/tqsdk-python folder doc/ai_editor/skills/tqsdk-trading-and-data (commit cde7f57) for all my projects, at ~/.claude/skills/tqsdk-trading-and-data (in Codex use ~/.agents/skills/tqsdk-trading-and-data, in Cursor ~/.cursor/skills/tqsdk-trading-and-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill tqsdk-trading-and-data from https://github.com/shinnytech/tqsdk-python folder doc/ai_editor/skills/tqsdk-trading-and-data (commit cde7f57) into the project this chat is open in (at .claude/skills/tqsdk-trading-and-data; in Codex use .agents/skills/tqsdk-trading-and-data, in Cursor .cursor/skills/tqsdk-trading-and-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Checked against official docs 2026年11月12日 · Source: code.claude.com, learn.chatgpt.com, cursor.com

For Terminal users

其他支持 Agent Skills 的应用(如 Gemini CLI、GitHub Copilot)使用不同文件夹,请查看该应用的指南,再把含 SKILL.md 的文件夹复制过去。

在 GitHub 上查看 ↗

已于 2026年11月11日 对照 Claude Code、Codex 和 Cursor 官方指南核实 skill 文件夹

✓ 命令已检查 2026年11月17日

查看原始 SKILL.md

以下文字来自开发者的 repo,不是 PopNx MCP 的指令

2,905 个字符 · 在 GitHub 打开完整文件

---
name: tqsdk-trading-and-data
description: "使用 TqSdk Python SDK 获取行情与历史数据、编写或排查交易与回测程序,并在需要本地运行时检查环境、安装缺失的 TqSdk。适用于明确使用 TqSdk、TqApi、TargetPosTask 等接口的开发、数据和账户问题;通用金融问答或其他数据产品不必使用本技能。"
---

# TqSdk Trading and Data

用实际接口完成用户的 TqSdk 任务。先确定任务和运行环境,按需读取专题参考,再生成最小可运行方案并验证结果。技能包是使用说明,不是已安装的 SDK,也不代表已经连接任何账户。

## 开始处理

1. **确认任务范围。** 区分接口解释、代码编写、本地执行和实盘操作。尊重用户指定的账户、合约、时间范围和项目约束;只有缺少会影响结果的必要信息时才询问。
2. **需要本地运行时,先检查环境。** 用项目实际运行脚本的解释器执行 [scripts/check_environment.py](scripts/check_environment.py)。只解释接口时不必安装软件。若状态为 `not_installed`,按 [environment-setup.md](references/environment-setup.md) 在当前项目环境中安装 TqSdk,验证导入后继续任务。已有版本可用时不自动升级;导入损坏不能当成未安装处理。
3. **以用户版本为准。** 优先检查已安装 SDK 的签名、docstring 和相关源码;有仓库时参考对应版本的源码。发布文档和技能示例可能比用户版本新,不要虚构接口或为了一个示例擅自升级。技能内的仓库路径不保证存在于用户电脑上,替代入口见 [example-map.md](references/example-map.md)。
4. **选择运行模式。** 仅取数或无账户要求的入门程序可显式用 `TqSim()`;用户要求快期模拟、实盘或股票账户时保留该选择。`TqAuth` 是快期服务认证,`TqAccount` 是期货资金账户。实盘登录失败时报告错误,不能悄悄换成模拟账户。
5. **验证并交付。** 先做语法和导入检查,再按任务验证实际数据、输出文件或回测结果。缺少认证时继续完成可离线验证的部分,明确未运行的步骤。报告使用的解释器、SDK 版本和实际验证结果;不能把语法通过说成行情或交易成功。

## 按任务读取

| 当前任务 | 参考文件 |
| --- | --- |
| 安装、解释器、依赖或导入错误 | [environment-setup.md](references/environment-setup.md) |
| `wait_update`、`is_changing`、超时与异步通知 | [wait-update-and-update-loop.md](references/wait-update-and-update-loop.md) |
| 行情、K 线、Tick、合约发现和历史下载 | [market-data.md](references/market-data.md) |
| 选择本地模拟、快期模拟、实盘、股票或多账户 | [account-type-matrix.md](references/account-type-matrix.md) |
| 读取资金、持仓、委托、成交 | [accounts-and-trading.md](references/accounts-and-trading.md) |
| 手工下单、撤单、目标持仓、调度执行和最小开仓手数 | [order-functions-and-position-tools.md](references/order-functions-and-position-tools.md) |
| 数据与账户对象的字段含义 | [object-fields.md](references/object-fields.md) |
| 模拟与历史回测 | [simulation-and-backtest.md](references/simulation-and-backtest.md) |
| 保证金、风险度和 `TqScenario` 试算 | [scenario-and-margin.md](references/scenario-and-margin.md) |
| 运行错误与排查顺序 | [error-faq.md](references/error-faq.md) |
| 官方示例、文档和源码定位 | [example-map.md](references/example-map.md) |

## 编写代码时保持的规则

- `get_*` 通常返回持续更新的引用。订阅一次并保存对象,用 `wait_update()` 推进,再用 `is_changing()` 或明确的就绪条件处理相关更新。需要历史快照时显式复制;不要通过反复订阅或 `sleep()` 等待数据。
- K 线 `iloc[-1]` 是正在形成的柱。按收盘信号交易时,在新柱出现后使用 `iloc[-2]` 和已完成的窗口;检查长度、`NaN` 和数据时间。回测保持用户原有信号、撮合和估值时点,不用未来数据。
- 当前行情示例优先使用 `KQ.m@...` 主连;主连不能直接下单。交易用用户指定或已核实的真实合约,必要时读取主连的 `underlying_symbol`;不能把合约列表第一项当成主力。历史回测按目标日期核实合约覆盖,不用今天的 `expired=False` 排除历史合约。
- `insert_order()` 返回不代表成交,`FINISHED` 也可能是撤单或拒单。结合 `volume_left`、`last_msg` 和成交记录判断;有时限时报告实际状态,不能将超时当作已撤单。
- 同一账户、同一合约选择一种持仓控制方式。不要把 `TargetPosTask` 与手工下单混用;股票账户不使用期货 `offset` 或 `TargetPosTask`。多账户操作明确传入 `account=`。
- 用环境变量、交互式隐藏输入或项目已有安全配置提供凭据,不把真实密码写进示例、日志或聊天。安装、导入和只读取数不包含实盘下单授权;执行实盘下单或撤单前,确认操作参数在用户已有授权范围内。
- API 会话用上下文管理器或 `finally: api.close()` 释放。回测处理 `BacktestFinished`,交互式取数在需要时设置合理超时并报告是否收到有效数据。
- `TqScenario` 只做期货快照试算。计算当前账户风险时显式传入该账户权益;说明保证金数据来自行情还是账户查询及可能的回退。试算结果不保证真实可成交手数,详细限制按需读取专题参考。

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

登录后发帖

来自 GitHub

GitHub 星标
5,144
开发者
shinnytech
许可证
Apache-2.0
最近代码更新
2026年10月26日
repo 中的 SKILL.md 文件(含译本和模板)
1
主题
diff, futures, program-trading, python, quant, tqsdk