ib-connector

ib-connector is a skill for Claude Code, Codex from oh-rid/claude-code-plugin-ib. It costs 137 tokens per session (6,240 once invoked), scanned A, original, MIT.

A read-only connection guide for Interactive Brokers, an online brokerage platform, through its Client Portal API.

In plain words
What is it for?
It is for checking market prices, option chains, positions, account details, historical price bars, session status, margin requirements, liquidation risk, and buying power.
Why use it?
It gives the agent a defined way to retrieve current and historical trading information without placing, cancelling, or changing orders.

Skill for Claude CodeCodex

Part of the ib-portfolio-management plugin — 6 skills, 1 command, 1 agent, 2 hooks shipped together

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.

agentmods
npx agentmods add skills/oh-rid/claude-code-plugin-ib/ib-connector
Any agent
npx skills add oh-rid/claude-code-plugin-ib --skill ib-connector
Clone the repo
git clone --depth 1 https://github.com/oh-rid/claude-code-plugin-ib

Made for: Claude Code, Codex.

Or install ib-portfolio-management, the plugin that ships this one along with the rest of its 6 skills, 1 command, 1 agent, 2 hooks.

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 ib-connector

README.md
[![agentmods](https://agentmods.dev/badge/skills/oh-rid/claude-code-plugin-ib/ib-connector.svg)](https://agentmods.dev/skills/oh-rid/claude-code-plugin-ib/ib-connector)
Your own site
<a href="https://agentmods.dev/skills/oh-rid/claude-code-plugin-ib/ib-connector"><img src="https://agentmods.dev/badge/skills/oh-rid/claude-code-plugin-ib/ib-connector.svg" alt="Measured on agentmods" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,240 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00137 $0.06240
Opus 5 $0.00068 $0.03120
Sonnet 5 $0.00027 $0.01248
Haiku 4.5 $0.00014 $0.00624

Measured 5d ago against content hash 934b50d168f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ib-connector scanned grade A with 1 finding 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 5d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

All requests use `curl -sk` (self-signed cert, silent).
skills/ib-connector/SKILL.md · 570 lines

How it starts

The opening of the file, as written. The whole thing — 570 lines — stays where its author put it; the contents beside it link to each section on GitHub.

IB Client Portal Gateway — Live Data Reference

Official Documentation

Base URL for all requests: https://localhost:5000/v1/api

All requests use curl -sk (self-signed cert, silent).

Placeholder convention: ${ACCOUNT_ID} in curl examples is your IB account identifier (looks like U1234567 or DU1234567 for paper). Fetch it once with curl -sk https://localhost:5000/v1/api/portfolio/accounts and either export it (export ACCOUNT_ID=U1234567) or substitute it into the URLs.

SAFETY — NO ORDERS

This plugin is for read-only market data only.

NEVER call these endpoints:

  • POST /iserver/account/{id}/order — places a live order
  • POST /iserver/account/{id}/orders — places multiple orders
  • DELETE /iserver/account/{id}/order/{orderId} — cancels order
  • POST /iserver/reply/{replyid} — confirms order execution

Orders through CP Gateway go straight to market after a 2-step API confirmation (no UI dialog like TWS Desktop). There is no undo.

If the user asks to place an order, tell them to use TWS Desktop or IB mobile app.


1. Session Management

Check session (ALWAYS do first)

curl -sk https://localhost:5000/v1/api/tickle

Response includes iserver.authStatus.authenticated (true/false).

  • "authenticated":true — proceed
  • "authenticated":false — tell user: "Open https://localhost:5000 in browser and log in again"
  • Connection refused — Gateway not running, tell user: run /ib-start

Auth status (detailed)

curl -sk -X POST https://localhost:5000/v1/api/iserver/auth/status

Returns: authenticated, competing, connected, serverInfo.

Read the full file on GitHub · 570 lines

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. 5d ago First seen · 570 lines · 137 tokens per session scan A 934b50d168f5

Subscribe to this mod's changes

ib-connector is a skill published in the GitHub repository oh-rid/claude-code-plugin-ib (5 stars, last pushed 3mo ago), licensed MIT. It adds 137 tokens to every session and 6,240 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.