← Back to Skills Marketplace
fatwang2

ibkr-cli

by fatwang2 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
218
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install ibkr-cli
Description
Guide users through Interactive Brokers CLI operations — from installing IB Gateway/TWS and ibkr-cli itself, to trading stocks, monitoring accounts, retrievi...
README (SKILL.md)

ibkr-cli

You are helping a user who may have zero prior experience with Interactive Brokers, command-line tools, or trading APIs. Your job is to guide them step by step — from setting up the infrastructure to executing trades — using the ibkr-cli tool.

How to approach the user

Start by understanding where the user is in their journey. Ask or infer:

  1. Do they have IB Gateway or TWS installed and running?
  2. Is ibkr-cli installed?
  3. Have they verified connectivity (ibkr doctor)?

Don't dump all commands at once. Walk them through the relevant next step based on their current state. If they say "I want to buy AAPL", first check whether they have the infrastructure in place — don't jump straight to ibkr buy.

Routing — read the right reference

Based on what the user needs, read the corresponding reference file for detailed commands and guidance:

User intent Reference file
Installing Gateway/TWS, installing ibkr-cli, configuring profiles, verifying connectivity, troubleshooting connection issues references/setup.md
Buying/selling stocks, previewing orders, limit orders, cancelling orders, order management references/trading.md
Quotes, historical bars, news headlines/articles, options chains, options greeks, market scanner/screener, company fundamentals, financial statements, ownership references/market-data.md
Account summary, positions, portfolio, JSON output, updating the CLI references/account.md

When a user's request spans multiple areas (e.g., "set up ibkr and buy some AAPL"), read the relevant references in sequence — start with setup, then move to trading once the infrastructure is confirmed.

Key principles

These apply across all commands — keep them in mind regardless of which reference you're reading:

  • Connection priority: Unless the user explicitly mentions "paper" or a paper account, prefer live profiles over paper, and gateway over TWS. The priority order is: gateway-live (port 4001) > live (port 7496) > gateway-paper (port 4002) > paper (port 7497). When connecting for the first time or when the user hasn't specified a profile, try ibkr connect test --profile gateway-live --json first. If it fails, try the next profile in the priority list. Once a working profile is found, use it for subsequent commands.
  • Profile flag: Most commands accept --profile. Always be explicit about which profile to use. If the user hasn't specified one and you haven't yet determined which profile works, run the connection priority check first.
  • One connection at a time: Running multiple ibkr-cli processes against the same profile simultaneously can cause client_id conflicts. Run commands serially per profile.
  • JSON output: All read and trading commands support --json for machine-readable output. Error responses follow a structured format with ok, error.code, error.message, and error.exit_code fields.
Usage Guidance
This skill appears to be what it says: step-by-step guidance for IBKR's CLI. Before you install or allow the agent to use it, consider the following: (1) The skill prefers live trading profiles by default — if you are testing, explicitly tell it to use a paper profile (or make the agent confirm first). (2) The CLI enforces a preview/submit model, but always review any `--submit` action yourself; don't let the agent place orders autonomously. (3) The skill will ask you to run local commands and to log into IB Gateway/TWS locally — it does not collect your IB credentials itself, but those credentials will be used by the local app. (4) If you want safety, require manual confirmation for any trade submission or restrict use to a paper account until you are comfortable. If you want me to, I can: walk you through installing a paper Gateway and ibkr-cli, show how to run a preview order, or suggest prompts that force explicit confirmation before any --submit is run.
Capability Analysis
Type: OpenClaw Skill Name: ibkr-cli Version: 1.0.1 The skill bundle provides comprehensive documentation and operational instructions for an AI agent to interact with the `ibkr-cli` tool for Interactive Brokers. It includes well-structured guidance for setup, account management, market data retrieval, and trading, featuring safety mechanisms like a mandatory 'preview-then-submit' model for orders. No evidence of malicious intent, data exfiltration, or prompt injection was found; all instructions and external links (e.g., to interactivebrokers.com) align with the stated purpose of brokerage account management.
Capability Assessment
Purpose & Capability
The name/description (ibkr-cli guidance) match the included reference files and runtime instructions. The skill does not request unrelated binaries, environment variables, or config paths.
Instruction Scope
Instructions stay within the domain of installing/configuring IB Gateway/TWS and using ibkr-cli. Two points to note: (1) the routing rules and Key Principles prefer live profiles by default (gateway-live/live before paper), which can be surprising; (2) the skill is configured to trigger broadly when users mention buying/selling from the command line (the trigger wording is aggressive). Both are coherent with a trading-focused skill but increase the chance of interacting with live accounts if the agent errs.
Install Mechanism
Instruction-only skill with no install spec or downloads. It recommends standard, documented installation methods (pipx/pip) for ibkr-cli; no archive downloads or external installers are embedded in the skill.
Credentials
The skill does not request environment variables, credentials, or access to unrelated services. It correctly expects the user to run and log into IB Gateway/TWS locally; it does not attempt to collect or exfiltrate secrets via environment variables.
Persistence & Privilege
always is false and there is no installation script or skill-level persistence. The skill can be invoked autonomously (platform default), but that is not combined with any elevated privileges in this bundle.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ibkr-cli
  3. After installation, invoke the skill by name or use /ibkr-cli
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
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.
v1.0.0
Support ibkr-cli
Metadata
Slug ibkr-cli
Version 1.0.1
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is ibkr-cli?

Guide users through Interactive Brokers CLI operations — from installing IB Gateway/TWS and ibkr-cli itself, to trading stocks, monitoring accounts, retrievi... It is an AI Agent Skill for Claude Code / OpenClaw, with 218 downloads so far.

How do I install ibkr-cli?

Run "/install ibkr-cli" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is ibkr-cli free?

Yes, ibkr-cli is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does ibkr-cli support?

ibkr-cli is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ibkr-cli?

It is built and maintained by fatwang2 (@fatwang2); the current version is v1.0.1.

💬 Comments