An investment portfolio tracker that runs entirely locally. All data stays in ~/.portfolio-tracker/.
An investment portfolio tracker that runs entirely locally. All data stays in ~/.portfolio-tracker/.
~/.portfolio-tracker/data.json (portfolios, assets, prices)~/.portfolio-tracker/config.json (API keys, wallet addresses, user profile)<skill-path>/scripts/, run via npx tsxBefore running any script, ensure dependencies are installed:
npm install --prefix <skill-path>/scripts
Replace <skill-path> with the actual installed path of this skill.
Each script is a standalone CLI tool. Run them with:
npx tsx <skill-path>/scripts/<script>.ts <command> [args]
Scripts read from stdin when needed and output JSON to stdout.
load — Read portfolio data (creates default if missing)save — Write portfolio data (JSON from stdin)load-config — Read configsave-config — Write config (JSON from stdin)crypto <symbol> — Get crypto price (Binance → CoinGecko)stock <symbol> — Get stock price (Yahoo Finance)fx — Get USD/CNY/HKD exchange rateshistorical <symbol> — Get 3yr monthly historical datasearch <query> — Search for assets by name/symbolrefresh — Batch refresh prices (assets JSON from stdin)sync <apiKey> <apiSecret> — Fetch all Binance balances (6 account types)validate <apiKey> <apiSecret> — Validate API credentialssync <token> <queryId> — Fetch IBKR positions via Flex Queryvalidate <token> <queryId> — Validate IBKR credentialssync <address> [chain] — Fetch wallet balances (single chain or all 5 EVM chains)validate <address> — Validate EVM address{
"id": "unique-id",
"type": "CRYPTO | USSTOCK | HKSTOCK | ASHARE | CASH",
"symbol": "BTC",
"name": "Bitcoin",
"quantity": 1.5,
"avgPrice": 40000,
"currentPrice": 50000,
"currency": "USD | CNY | HKD",
"transactions": [],
"source": { "type": "manual | binance | wallet | ibkr" }
}
{
"id": "unique-id",
"name": "Main",
"assets": [...]
}
data-store.ts loadcurrentPortfolioIdquantity * currentPrice per assetexchangeRatesfetch-prices.ts search <query>fetch-prices.ts crypto/stock <symbol>fetch-prices.ts refresh via stdinfetch-prices.ts fx for exchange ratescurrentPrice and the exchangeRateslastPriceRefresh to current ISO timestampAvailable user commands:
/portfolio — View and manage portfolios/prices — Refresh all prices/setup — Configure API keys and wallets/sync-binance — Sync from Binance/sync-ibkr — Sync from Interactive Brokers/sync-wallet — Sync from blockchain wallet/advise — Get AI investment advice