snaptrade-portfolio
Connect to a user's investment accounts via SnapTrade SDK and generate portfolio reports (e.g., daily total value). Use when the user wants SnapTrade-based brokerage connectivity (Webull, E*TRADE, etc.), connection portal links, account registration, or automated portfolio summaries.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/brendanwood/snaptradeSnapTrade Portfolio
Overview
Connect brokerage accounts through SnapTrade and generate a daily total-value report. This skill uses the official SnapTrade Python SDK (snaptrade_client) with request signing handled automatically.
Workflow
2d) Place buy/sell orders (stocks/ETFs)
Run:
python3 scripts/snaptrade_order.py buy|sell TICKER UNITS --account-id <ACCOUNT_ID> [--order-type market|limit] [--limit-price <PRICE>] [--tif Day|GTC|IOC|FOK]
Defaults:
- order type: market
- time in force: Day
- limit price: only required for limit orders
Optional monitoring (poll recent orders):
python3 scripts/snaptrade_order.py buy|sell TICKER UNITS --account-id <ACCOUNT_ID> --watch
- polls every 10s for up to 120s by default
- adjust with
--watch-intervaland--watch-seconds
Watch an existing order by ID:
python3 scripts/snaptrade_watch_order.py --account-id <ACCOUNT_ID> --order-id <BROKERAGE_ORDER_ID>
- same 10s/120s defaults, adjustable with
--watch-intervaland--watch-seconds
Use account orders endpoint to confirm fills and report open orders to the user when asked.
0) Create a SnapTrade account + API keys
You need a SnapTrade account to connect brokerages. Create a free account at https://snaptrade.com, generate your Client ID and Consumer Key, then add them to the skill config.
1) Install dependencies
pip3 install -r requirements.txt
2) Configure credentials (one-time)
Store credentials in a local config file (not committed). user_id is generated automatically on first run:
/home/openclaw/.openclaw/workspace/secrets/snaptrade.json
Example:
{
"client_id": "YOUR_CLIENT_ID",
"consumer_key": "YOUR_CONSUMER_KEY",
"user_id": "<auto-generated-uuid>"
}
2) Register user + generate connection portal link
Run:
python3 scripts/snaptrade_portal.py
This will:
- register the user if
user_secretis missing - store
user_secretback into the config file - print a connection portal URL the user must open to link accounts
2b) Reconnect a disabled connection
Run:
python3 scripts/snaptrade_reconnect.py [brokerage-name]
This will:
- list disabled connections
- generate a reconnect link (optionally match by brokerage name)
- print a reconnect URL for the user to re‑enable the connection
2c) List available brokerages (allowed connections)
Run:
python3 scripts/snaptrade_brokers.py
This calls /snaptrade/partners and returns the allowed_brokerages list (display names).
3) Pull total portfolio value
Run:
python3 scripts/snaptrade_total.py
Output is JSON like:
{"total_value": 123456.78, "currency": "CAD"}
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-brendanwood-snaptrade": {
"enabled": true,
"auto_update": true
}
}
}