finance-data: v1.1.0 — add step-by-step API key signup instructions and agent directive to proactively obtain keys
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: finance-data
|
||||
description: "Free finance APIs for stock, ETF, and mutual fund data — yfinance (no key), Alpha Vantage, Polygon.io, Twelve Data. Multi-backend with automatic fallback."
|
||||
version: 1.0.0
|
||||
version: 1.1.0
|
||||
author: Hermes Agent
|
||||
metadata:
|
||||
hermes:
|
||||
@@ -29,16 +29,41 @@ pip install yfinance
|
||||
```
|
||||
|
||||
### Alpha Vantage (free key)
|
||||
1. Sign up at https://www.alphavantage.co/support/#api-key
|
||||
2. Set env: `export ALPHA_VANTAGE_API_KEY=your_key`
|
||||
1. Go to https://www.alphavantage.co/support/#api-key
|
||||
2. Fill in name, email, organization (any values work)
|
||||
3. Click "GET FREE API KEY"
|
||||
4. Copy the key from the page
|
||||
5. Set env: `export ALPHA_VANTAGE_API_KEY=your_key`
|
||||
|
||||
### Polygon.io (free key)
|
||||
1. Sign up at https://polygon.io/dashboard/signup
|
||||
2. Set env: `export POLYGON_API_KEY=your_key`
|
||||
1. Go to https://polygon.io/dashboard/signup
|
||||
2. Sign up with email and password
|
||||
3. Verify email (check inbox for confirmation link)
|
||||
4. Log in, go to Dashboard → API Keys
|
||||
5. Copy the "Default" key
|
||||
6. Set env: `export POLYGON_API_KEY=your_key`
|
||||
|
||||
### Twelve Data (free key)
|
||||
1. Sign up at https://twelvedata.com/apikey
|
||||
2. Set env: `export TWELVE_DATA_API_KEY=your_key`
|
||||
1. Go to https://twelvedata.com/apikey
|
||||
2. Click "Get Free API Key"
|
||||
3. Sign up with email or Google/GitHub
|
||||
4. Key is shown immediately on the dashboard
|
||||
5. Set env: `export TWELVE_DATA_API_KEY=your_key`
|
||||
|
||||
## Getting API Keys — Agent Directive
|
||||
|
||||
**When a backend fails because no API key is set, do NOT just report the failure.** Proactively obtain a key:
|
||||
|
||||
1. Check which backends are missing keys: `echo $ALPHA_VANTAGE_API_KEY`, `echo $POLYGON_API_KEY`, `echo $TWELVE_DATA_API_KEY`
|
||||
2. For each missing key, open the signup URL in the browser tool and walk through the signup flow
|
||||
3. Save each key to `~/.hermes/.env` and the active profile's `.env`:
|
||||
```bash
|
||||
echo 'ALPHA_VANTAGE_API_KEY=abc123' >> ~/.hermes/.env
|
||||
echo 'ALPHA_VANTAGE_API_KEY=abc123' >> ~/.hermes/profiles/general/.env
|
||||
```
|
||||
4. Verify: `curl -s "https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=IBM&apikey=$ALPHA_VANTAGE_API_KEY" | python3 -c "import sys,json; d=json.load(sys.stdin); print('OK' if 'Global Quote' in d else 'FAIL: '+str(d))"`
|
||||
|
||||
**Priority order for obtaining keys:** Twelve Data first (800/day, best free tier), then Polygon (5/min, good for spot checks), then Alpha Vantage (25/day, last resort). Always get at least one keyed backend so yfinance VPN blocks have a fallback.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user