返回顶部
i

ibkr-cli盈透CLI指南

Guide users through Interactive Brokers CLI operations — from installing IB Gateway/TWS and ibkr-cli itself, to trading stocks, monitoring accounts, retrieving market data, reading financial news, exploring options chains, screening stocks with market scanners, and querying company fundamentals. Use this skill whenever the user mentions Interactive Brokers, IBKR, TWS, IB Gateway, stock trading via CLI, checking portfolios or positions, getting quotes, placing orders, reading stock news, options

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
189
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

ibkr-cli

ibkr-cli

你正在帮助一位可能对盈透证券、命令行工具或交易API毫无经验的用户。你的任务是引导他们逐步完成从基础设施搭建到执行交易的全过程——使用ibkr-cli工具。

如何与用户沟通

首先了解用户当前所处的阶段。询问或推断:

  1. 1. 他们是否已安装并运行了IB Gateway或TWS?
  2. ibkr-cli是否已安装?
  3. 他们是否已验证了连接状态(ibkr doctor)?

不要一次性抛出所有命令。根据他们当前的状态,引导他们完成相关的下一步操作。如果用户说我想买入AAPL,首先检查他们的基础设施是否就绪——不要直接跳到ibkr buy。

路由——查阅正确的参考文件

根据用户的需求,阅读相应的参考文件以获取详细的命令和指导:

用户意图参考文件
安装Gateway/TWS、安装ibkr-cli、配置配置文件、验证连接、排查连接问题references/setup.md
买入/卖出股票、预览订单、限价单、取消订单、订单管理
references/trading.md |
| 行情报价、历史K线、新闻标题/文章、期权链、期权希腊值、市场扫描器/筛选器、公司基本面、财务报表、持股情况 | references/market-data.md |
| 账户摘要、持仓、投资组合、JSON输出、更新CLI | references/account.md |

当用户的请求涉及多个领域时(例如设置ibkr并买入一些AAPL),按顺序阅读相关参考文件——从设置开始,确认基础设施就绪后再转向交易。

关键原则

这些原则适用于所有命令——无论你在阅读哪个参考文件,请牢记:

  • - 连接优先级:除非用户明确提到模拟或模拟账户,否则优先使用实盘配置文件而非模拟,优先使用gateway而非TWS。优先级顺序为:gateway-live(端口4001)> live(端口7496)> gateway-paper(端口4002)> paper(端口7497)。首次连接或用户未指定配置文件时,先尝试ibkr connect test --profile gateway-live --json。如果失败,则按优先级列表尝试下一个配置文件。一旦找到可用的配置文件,后续命令均使用该配置。
  • 配置文件标志:大多数命令都接受--profile参数。始终明确指定要使用的配置文件。如果用户未指定且你尚未确定哪个配置文件可用,请先执行连接优先级检查。
  • 每次只建立一个连接:同时针对同一配置文件运行多个ibkr-cli进程可能导致clientid冲突。每个配置文件应串行执行命令。
  • JSON输出:所有读取和交易命令均支持--json参数以输出机器可读格式。错误响应采用结构化格式,包含ok、error.code、error.message和error.exitcode字段。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ibkr-cli-1776294009 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ibkr-cli-1776294009 技能

通过命令行安装

skillhub install ibkr-cli-1776294009

下载

⬇ 下载 ibkr-cli v1.0.1(免费)

文件大小: 9.41 KB | 发布时间: 2026-4-16 18:28

v1.0.1 最新 2026-4-16 18:28
ibkr-cli 1.0.1

- Added detailed documentation in four new reference files: setup, trading, market data, and account management.
- Expanded skill description to cover news, options chains, market scanning, fundamentals, and more.
- Introduced a routing system: directs user requests to the appropriate reference file based on user intent.
- Clarified connection profile preferences and error-handling guidance for first-time and troubleshooting scenarios.
- Emphasized key usage principles, including explicit profile selection, serial command execution, and structured JSON output support.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部