You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`ibctl holding value`| Display portfolio value with estimated tax impact |
57
60
|`ibctl transaction list`| List all transactions (buys, sells, dividends, interest, WHT, etc.) chronologically |
58
61
|`ibctl transaction sale list`| List realized security sales with FIFO lot matching for tax reporting |
59
-
|`ibctl probe`| Probe the API and show per-account data counts |
60
62
61
-
All commands accept `--dir` to specify the ibctl directory (defaults to `.`). All holding and transaction commands accept `--base-currency` (default `USD`) to convert values to a different currency. Use `--help` on any command for detailed documentation.
63
+
All commands accept `--dir` to specify the ibctl directory (defaults to `.`). All holding and transaction commands accept `--base-currency` (default `USD`) to convert values to a different currency. Holding commands accept `--realtime` to fetch current stock prices and FX rates from Yahoo Finance on-demand. For international symbols where IBKR and Yahoo symbols differ, add mappings to `realtime_symbols` in `ibctl.yaml`. Use `--help` on any command for detailed documentation.
Aggregates holdings by geographic classification and displays each geo's market value, percentage of net liquidation value, and capital gains breakdown.
@@ -38,5 +38,6 @@ Use `--category` to filter holdings to a single category before aggregating by g
38
38
|`--dir`|`.`| The ibctl directory containing `ibctl.yaml`|
39
39
|`--format`|`table`| Output format: `table`, `csv`, or `json`|
40
40
|`--download`|`false`| Download fresh data before displaying |
41
+
|`--realtime`|`false`| Fetch real-time stock quotes and FX rates from Yahoo Finance |
41
42
|`--category`| (all) | Filter by category before aggregating (e.g., `EQUITY`, `FIXED_INCOME`) |
42
43
|`--base-currency`|`USD`| Base currency for value conversion (case-insensitive, e.g., `USD`, `CAD`) |
Shows combined positions across all accounts. Positions are computed via FIFO tax lot matching with weighted average cost basis, then verified against IBKR-reported positions.
@@ -62,11 +62,18 @@ The command verifies computed positions against IBKR-reported positions and logs
62
62
63
63
Unmatched sells (where the buy occurred before the data window) are also logged as warnings.
64
64
65
+
## Real-time pricing
66
+
67
+
Use `--realtime` to fetch current market prices and FX rates from Yahoo Finance on-demand, without downloading or persisting data. This is useful for intraday portfolio monitoring. Symbols that Yahoo cannot resolve (bonds, unmapped international tickers) fall back to cached IBKR prices with a warning.
68
+
69
+
For international symbols where IBKR and Yahoo Finance symbols differ (e.g., Canadian equities), add symbol mappings to the `realtime_symbols` section of your config. Real-time data is not cached — each run fetches fresh prices from Yahoo Finance.
70
+
65
71
## Flags
66
72
67
73
| Flag | Default | Description |
68
74
|------|---------|-------------|
69
75
|`--dir`|`.`| The ibctl directory containing `ibctl.yaml`|
70
76
|`--format`|`table`| Output format: `table`, `csv`, or `json`|
71
77
|`--download`|`false`| Download fresh data before displaying |
78
+
|`--realtime`|`false`| Fetch real-time stock quotes and FX rates from Yahoo Finance |
72
79
|`--base-currency`|`USD`| Base currency for value conversion (case-insensitive, e.g., `USD`, `CAD`) |
Copy file name to clipboardExpand all lines: book/src/commands/holding-lot-list.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# holding lot list
2
2
3
3
```
4
-
ibctl holding lot list [--dir DIR] [--format FORMAT] [--download] [--symbol SYMBOL] [--base-currency CURRENCY]
4
+
ibctl holding lot list [--dir DIR] [--format FORMAT] [--download] [--realtime] [--symbol SYMBOL] [--base-currency CURRENCY]
5
5
```
6
6
7
7
Lists individual FIFO tax lots. Unlike `holding list`, which aggregates positions by symbol, this command shows each tax lot separately with its own open date, quantity, and cost basis.
@@ -51,5 +51,6 @@ The table output includes a totals row summing P&L {BASE}, STCG {BASE}, LTCG {BA
51
51
|`--dir`|`.`| The ibctl directory containing `ibctl.yaml`|
52
52
|`--format`|`table`| Output format: `table`, `csv`, or `json`|
53
53
|`--download`|`false`| Download fresh data before displaying |
54
+
|`--realtime`|`false`| Fetch real-time stock quotes and FX rates from Yahoo Finance |
54
55
|`--symbol`| (all) | Filter to a specific symbol. Omit to show all symbols. |
55
56
|`--base-currency`|`USD`| Base currency for value conversion (case-insensitive, e.g., `USD`, `CAD`) |
Copy file name to clipboardExpand all lines: book/src/configuration.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,13 @@ additions:
68
68
quantity: "100"
69
69
last_price: "115.30"
70
70
tax_exempt: true
71
+
72
+
# Symbol mapping for real-time quote lookups.
73
+
# Optional. Maps IBKR symbols to Yahoo Finance symbols for international tickers
74
+
# where symbols differ. Only used with the --realtime flag.
75
+
realtime_symbols:
76
+
BRK B: BRK-B
77
+
"700": "0700.HK"
71
78
```
72
79
73
80
## Field Reference
@@ -137,3 +144,14 @@ If not set, both rates default to zero and the `holding value` command shows no
137
144
| `quantity` | Quantity as a decimal string | Yes |
138
145
| `last_price` | Most recent market price as a decimal string (fallback when no IBKR position exists) | Yes |
139
146
| `tax_exempt` | Whether this trade is in a tax-sheltered account (TFSA, RRSP). When true, P&L, STCG, and LTCG are shown as zero in all output. | No (default: `false`) |
147
+
148
+
### `realtime_symbols`
149
+
150
+
**Optional.** A mapping from IBKR ticker symbols to Yahoo Finance symbols, used by the `--realtime` flag on holding commands. Only needed for international tickers where IBKR and Yahoo Finance use different symbols (e.g., Canadian equities, Hong Kong stocks).
151
+
152
+
| Field | Description | Example |
153
+
|-------|-------------|---------|
154
+
| Key (IBKR symbol) | The ticker symbol as reported by IBKR | `BRK B`, `700` |
155
+
| Value (Yahoo symbol) | The equivalent symbol on Yahoo Finance | `BRK-B`, `0700.HK` |
156
+
157
+
US-listed securities typically need no mapping. If a symbol is not mapped and Yahoo Finance cannot resolve the IBKR symbol, the command logs a warning and falls back to the cached IBKR price for that symbol.
0 commit comments