openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > portfolio tracking

An investment portfolio tracker that runs entirely locally. All data stays in ~/.portfolio-tracker/.

开发与 DevOps

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.0.0

统计:⭐ 2 · 354 · 0 current installs · 0 all-time installs

2

安装量(当前) 0

🛡 VirusTotal :可疑 · OpenClaw :可疑

Package:aigeneralstore/portfolio-tracking-skill

安全扫描(ClawHub)

  • VirusTotal :可疑
  • OpenClaw :可疑

OpenClaw 评估

The skill mostly does what it says (local data storage and local CLI scripts) but its documentation claims 'no data is sent to any server' while the shipped scripts call external services (Binance, CoinGecko/Yahoo, and hard-coded RPC providers), and API keys are stored plaintext in ~/.portfolio-tracker — this mismatch and privacy leakage risk warrant caution.

目的

The skill's name/description promise a 'local' tracker with data kept under ~/.portfolio-tracker. The code and runtime instructions do persist data there, but the implementation also makes numerous outbound network calls (Binance APIs for account sync, price providers, and hard-coded EVM RPC endpoints such as https://eth.llamarpc.com). The README/SKILL.md claim 'No data is sent to any server' is therefore inaccurate.

说明范围

SKILL.md instructs the agent to run local scripts (via npx tsx) and to save API credentials into ~/.portfolio-tracker/config.json. The scripts explicitly perform network operations: signed requests to Binance, IBKR Flex Query use, CoinGecko/Yahoo price fetches, and querying public RPC nodes for wallet balances. There are no instructions to read unrelated system files or environment variables, but the instructions understate external communicat…

安装机制

This is instruction-only (no packaged installer) but the SKILL.md requires running npm install in <skill-path>/scripts. The package-lock shows dependencies pulled from npm (ethers, fast-xml-parser, tsx, etc.). Installing via npm is expected for TypeScript scripts and the sources come from public registries, not arbitrary download URLs. This is a standard but non-trivial footprint (node_modules) to be installed locally.

证书

The skill requests no environment variables but asks users to input sensitive credentials (Binance API key/secret, IBKR token/queryId, wallet addresses) which are stored in plaintext in ~/.portfolio-tracker/config.json. Requesting these secrets is proportional to the functionality, but storing them unencrypted on disk and the README's misleading claim about 'no data sent' are concerning. Additionally, hard-coded RPC endpoints mean wallet addre…

持久

The skill does not request always:true, does not modify other skills, and only writes to its own local data/config files under ~/.portfolio-tracker. It does not self-enable or persist beyond its own files in an unusual way.

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「portfolio tracking」。简介:An investment portfolio tracker that runs entirely locally. All data stays in ~…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/aigeneralstore/portfolio-tracking-skill/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: portfolio-tracker
description: An investment portfolio tracker that runs entirely locally. All data stays in ~/.portfolio-tracker/.
---

# Portfolio Tracker Skill

An investment portfolio tracker that runs entirely locally. All data stays in `~/.portfolio-tracker/`.

## Architecture

- **Data**: `~/.portfolio-tracker/data.json` (portfolios, assets, prices)
- **Config**: `~/.portfolio-tracker/config.json` (API keys, wallet addresses, user profile)
- **Scripts**: TypeScript CLI tools in `<skill-path>/scripts/`, run via `npx tsx`

## First-Time Setup

Before running any script, ensure dependencies are installed:

```bash
npm install --prefix <skill-path>/scripts
```

Replace `<skill-path>` with the actual installed path of this skill.

## How Scripts Work

Each script is a standalone CLI tool. Run them with:

```bash
npx tsx <skill-path>/scripts/<script>.ts <command> [args]
```

Scripts read from stdin when needed and output JSON to stdout.

### data-store.ts
- `load` — Read portfolio data (creates default if missing)
- `save` — Write portfolio data (JSON from stdin)
- `load-config` — Read config
- `save-config` — Write config (JSON from stdin)

### fetch-prices.ts
- `crypto <symbol>` — Get crypto price (Binance → CoinGecko)
- `stock <symbol>` — Get stock price (Yahoo Finance)
- `fx` — Get USD/CNY/HKD exchange rates
- `historical <symbol>` — Get 3yr monthly historical data
- `search <query>` — Search for assets by name/symbol
- `refresh` — Batch refresh prices (assets JSON from stdin)

### binance-sync.ts
- `sync <apiKey> <apiSecret>` — Fetch all Binance balances (6 account types)
- `validate <apiKey> <apiSecret>` — Validate API credentials

### ibkr-sync.ts
- `sync <token> <queryId>` — Fetch IBKR positions via Flex Query
- `validate <token> <queryId>` — Validate IBKR credentials

### blockchain-sync.ts
- `sync <address> [chain]` — Fetch wallet balances (single chain or all 5 EVM chains)
- `validate <address>` — Validate EVM address

## Data Types

### Asset
```json
{
  "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" }
}
```

### Portfolio
```json
{
  "id": "unique-id",
  "name": "Main",
  "assets": [...]
}
```

## Workflow Patterns

### Viewing Portfolio
1. Load data via `data-store.ts load`
2. Find current portfolio by `currentPortfolioId`
3. Calculate total value using `quantity * currentPrice` per asset
4. Convert to display currency using `exchangeRates`
5. Present as a formatted table

### Adding Assets
1. Load data
2. Search for the asset using `fetch-prices.ts search <query>`
3. Get current price via `fetch-prices.ts crypto/stock <symbol>`
4. Add asset to current portfolio with a generated unique ID
5. Save data

### Refreshing Prices
1. Load data
2. Pipe current portfolio assets to `fetch-prices.ts refresh` via stdin
3. Also run `fetch-prices.ts fx` for exchange rates
4. Update each asset's `currentPrice` and the `exchangeRates`
5. Set `lastPriceRefresh` to current ISO timestamp
6. Save data

### Syncing from Exchange/Wallet
1. Load config to get credentials
2. Run the appropriate sync script
3. Merge results: update existing assets (match by symbol+source), add new ones
4. Save data

## Commands

Available 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