Back to skills
SKILL.md
Alpha Vantage Finance
ASecurityAlpha Vantage financial API integration skill. Supports real-time intraday equity quotes, forex exchange rates (FX), global market news sentiment, and economic indicators.
- 16 stars
- 0 votes
- 0 copies
- 4 views
- Added November 12, 2026
Works with
Security analysis
100/100npx -y skills add hukim1112/frontier_agent_analysis --skill alpha-vantage-finance --agent claude-codeAre you the author of Alpha Vantage Finance?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hukim1112-alpha-vantage-finance)---
name: alpha-vantage-finance
description: Alpha Vantage financial API integration skill. Supports real-time intraday equity quotes, forex exchange rates (FX), global market news sentiment, and economic indicators.
category: finance
tags: [alpha-vantage, fx, forex, news-sentiment, economic-indicators, stocks]
dependencies: [requests, pandas, pydantic]
---
# alpha-vantage-finance Skill
A multi-asset financial data skill integrating Alpha Vantage for real-time global stock quotes, foreign exchange (FX) rates, news sentiment scores, and economic data series.
## ๐ฏ Educational & Practical Use Cases (Practical Focus)
- **Currency & Forex Conversion**: Real-time FX rates (USD/KRW, EUR/USD, JPY/KRW) and intraday exchange rate movements.
- **News & Sentiment Scoring**: Automated categorization of market news articles with bull/bear sentiment scores per ticker.
- **Intraday Market Micro-Structure**: Fetch 1-min / 5-min intervals with volume-weighted metrics.
- **Commodities & Macro Indicators**: Treasury yields, CPI, and Brent/WTI crude oil prices.
---
## ๐ ๏ธ LangChain & FastMCP Implementation
```python
"""
alpha_vantage_tools.py - Alpha Vantage API tools for LangChain & FastMCP Agents.
"""
from typing import Dict, Any, List, Optional
import os
import requests
from langchain_core.tools import tool
ALPHA_VANTAGE_API_KEY = os.getenv("ALPHA_VANTAGE_API_KEY", "demo")
BASE_URL = "https://www.alphavantage.co/query"
@tool
def get_forex_rate(from_currency: str, to_currency: str = "KRW") -> Dict[str, Any]:
"""
Get real-time foreign exchange rate between two currencies.
Examples: from_currency='USD', to_currency='KRW' or from_currency='EUR', to_currency='USD'.
"""
params = {
"function": "CURRENCY_EXCHANGE_RATE",
"from_currency": from_currency.upper(),
"to_currency": to_currency.upper(),
"apikey": ALPHA_VANTAGE_API_KEY
}
resp = requests.get(BASE_URL, params=params, timeout=10)
data = resp.json().get("Realtime Currency Exchange Rate", {})
if not data:
return {"error": "Failed to fetch exchange rate."}
return {
"from": data.get("1. From_Currency Code"),
"to": data.get("3. To_Currency Code"),
"exchange_rate": float(data.get("5. Exchange Rate", 0)),
"bid_price": float(data.get("8. Bid Price", 0)),
"ask_price": float(data.get("9. Ask Price", 0)),
"last_refreshed": data.get("6. Last Refreshed")
}
@tool
def get_market_news_sentiment(tickers: str, limit: int = 5) -> List[Dict[str, Any]]:
"""
Fetch latest market news articles and AI sentiment classification for specific tickers.
:param tickers: Comma-separated ticker symbols (e.g. 'AAPL,NVDA' or 'CRYPTO:BTC')
:param limit: Number of top news items to return
"""
params = {
"function": "NEWS_SENTIMENT",
"tickers": tickers.upper(),
"limit": limit,
"apikey": ALPHA_VANTAGE_API_KEY
}
resp = requests.get(BASE_URL, params=params, timeout=10)
feed = resp.json().get("feed", [])
results = []
for item in feed[:limit]:
results.append({
"title": item.get("title"),
"url": item.get("url"),
"source": item.get("source"),
"time_published": item.get("time_published"),
"overall_sentiment_score": item.get("overall_sentiment_score"),
"overall_sentiment_label": item.get("overall_sentiment_label"),
"summary": item.get("summary")
})
return results
```
---
## ๐ค ReAct Agent Scenario
```yaml
agent_interaction:
user_query: "์/๋ฌ๋ฌ ํ์จ๊ณผ ์ ํ(AAPL) ๊ด๋ จ ์ต์ ๋ด์ค ๊ฐ์ฑ ์ ์๋ฅผ ํ์ธํด์ค."
agent_steps:
1. Call `get_forex_rate(from_currency="USD", to_currency="KRW")`.
2. Call `get_market_news_sentiment(tickers="AAPL", limit=3)`.
3. Generate a combined foreign exchange and sentiment overview.
```
Attribution
Related skills
View all in development โComments
Loading commentsโฆ
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.