Ib account overview
Read-only Interactive Brokers (IBKR) diagnostics as portable AI-agent skills: account health, positions, daily P&L, trade history, dividends, options Greeks, and a P0–P3 graded portfolio report. Never places orders.
npx -y skills add luyangkk/ib-suite --skill ib-account-overviewAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 17 days oldThe repository was created 17 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Read-only account financial overview from Interactive Brokers. Use when the user asks for net liquidation, cash balance, buying power, margin (initial/maintenance/used), excess liquidity, or daily/unrealized/realized P&L, with per-currency balances converted to the base currency. Reads account state only — never positions detail, never orders.
SKILL.md
3.1 KB, 690 tokens by cl100k_base, as published. Nobody here has run it
ib-account-overview
Read-only account financial overview for the IB analyst toolchain. Answers
"how is my account doing right now?" in one call: equity, cash, buying power,
margin, liquidity, and P&L, plus a per-currency breakdown converted to the
account base currency. This skill connects with readonly=True and only reads;
it NEVER places, modifies, or cancels an order.
Prerequisites
Config and the shared venv are owned by the ib-suite index skill (see its
first-run setup). Start IB Gateway (paper on 4002 / live on 4001) with API
access, and tick Read-Only API in Gateway settings as an extra guard.
Commands
/ib-account-overview — read-only account financial overview
{baseDir}/../.venv/bin/python {baseDir}/scripts/account_overview.py --config .ib-suite/config.yaml
Prints a JSON object to stdout (parseable) with the fields below. It reads account state live and does not write to the data lake — nothing is persisted.
Field mapping (IB tag -> report field)
| Report field | Source |
|---|---|
| Net Liquidation | NetLiquidation |
| Cash Balance | TotalCashValue |
| Buying Power | BuyingPower |
| Margin Used (current) | MaintMarginReq |
| Initial Margin Req | FullInitMarginReq |
| Maintenance Margin Req | FullMaintMarginReq |
| Available Funds | AvailableFunds |
| Excess Liquidity | ExcessLiquidity |
| Gross Position Value | GrossPositionValue |
| Daily P&L | reqPnL().dailyPnL |
| Unrealized P&L | reqPnL().unrealizedPnL |
| Realized P&L | reqPnL().realizedPnL |
Daily/unrealized/realized P&L come from IB's pnl subscription (not
accountValues); the subscription is always cancelled after reading.
Multi-currency
Per-currency rows come from IB's $LEDGER-* ledger: $LEDGER-CashBalance,
$LEDGER-NetLiquidationByCurrency, and $LEDGER-ExchangeRate (local -> base).
Each currency_balances entry carries base_cash_balance /
base_net_liquidation (converted via that row's rate). The base-currency total
must use these base_* values — summing raw amounts mixes currencies. The
exchange rate is taken verbatim from IB's ledger, so figures reconcile with the
account and work without a live market-data subscription.
Notes
- All monetary figures are reported in the account base currency;
Currencyfrom the account summary sets it (configdata.base_currencyoverrides only when the account BASE is absent). - Same
clientIdallows only one active Gateway connection — the sharedconfig.yamlid is reused; close other sessions if the connect stalls. - Read-only guarantee: the entry script imports no order API and connects with
readonly=True. Do not add a write path here.
What ships with it: 3 files
11.7 KB alongside SKILL.md, 2 of them executable
scripts/
- account_overview.pyruns7.1 KB
tests/
- fixtures/ib_raw_overview_sample.json701 B
- test_account_overview.pyruns4.0 KB