superkit-mcp-server 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/agents/code-archaeologist.md +106 -0
- package/agents/devops-engineer.md +242 -0
- package/agents/orchestrator.md +420 -416
- package/agents/penetration-tester.md +188 -0
- package/agents/performance-optimizer.md +187 -0
- package/agents/qa-automation-engineer.md +103 -0
- package/agents/quant-developer.md +4 -0
- package/package.json +1 -1
- package/skills/meta/code-review/SKILL.md +7 -0
- package/skills/tech/alpha-vantage/SKILL.md +142 -0
- package/skills/tech/alpha-vantage/references/commodities.md +153 -0
- package/skills/tech/alpha-vantage/references/economic-indicators.md +158 -0
- package/skills/tech/alpha-vantage/references/forex-crypto.md +154 -0
- package/skills/tech/alpha-vantage/references/fundamentals.md +223 -0
- package/skills/tech/alpha-vantage/references/intelligence.md +138 -0
- package/skills/tech/alpha-vantage/references/options.md +93 -0
- package/skills/tech/alpha-vantage/references/technical-indicators.md +374 -0
- package/skills/tech/alpha-vantage/references/time-series.md +157 -0
- package/skills/tech/financial-modeling/SKILL.md +18 -0
- package/skills/tech/financial-modeling/skills/3-statements/SKILL.md +368 -0
- package/skills/tech/financial-modeling/skills/3-statements/references/formatting.md +118 -0
- package/skills/tech/financial-modeling/skills/3-statements/references/formulas.md +292 -0
- package/skills/tech/financial-modeling/skills/3-statements/references/sec-filings.md +125 -0
- package/skills/tech/financial-modeling/skills/dcf-model/SKILL.md +1211 -0
- package/skills/tech/financial-modeling/skills/dcf-model/TROUBLESHOOTING.md +40 -0
- package/skills/tech/financial-modeling/skills/dcf-model/requirements.txt +8 -0
- package/skills/tech/financial-modeling/skills/dcf-model/scripts/validate_dcf.py +292 -0
- package/skills/tech/financial-modeling/skills/lbo-model/SKILL.md +236 -0
- package/skills/tech/financial-modeling/skills/merger-model/SKILL.md +108 -0
- package/skills/tech/intelligent-routing/SKILL.md +5 -5
- package/workflows/kit-setup.md +8 -8
- package/workflows/map-codebase.md +78 -0
- package/workflows/plan-compound.md +6 -0
- package/workflows/plan_review.md +19 -3
- package/workflows/review-compound.md +36 -17
- package/workflows/specs.md +1 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Commodities APIs
|
|
2
|
+
|
|
3
|
+
Historical data for major commodities. All functions return `{"name": "...", "interval": "...", "unit": "...", "data": [{"date": "...", "value": "..."}, ...]}`.
|
|
4
|
+
|
|
5
|
+
## Metals
|
|
6
|
+
|
|
7
|
+
### GOLD_SILVER_SPOT — Real-time Gold & Silver Spot Price
|
|
8
|
+
|
|
9
|
+
**Required:** `symbol` — `GOLD` / `XAU` for gold; `SILVER` / `XAG` for silver
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
data = av_get("GOLD_SILVER_SPOT", symbol="GOLD")
|
|
13
|
+
# Returns current spot price
|
|
14
|
+
print(data["price"], data["unit"], data["timestamp"])
|
|
15
|
+
|
|
16
|
+
data = av_get("GOLD_SILVER_SPOT", symbol="SILVER")
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### GOLD_SILVER_HISTORY — Historical Gold & Silver Prices
|
|
20
|
+
|
|
21
|
+
**Required:** `symbol` (`GOLD`, `XAU`, `SILVER`, `XAG`), `interval` (`daily`, `weekly`, `monthly`)
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
data = av_get("GOLD_SILVER_HISTORY", symbol="GOLD", interval="daily")
|
|
25
|
+
for obs in data["data"][:10]:
|
|
26
|
+
print(obs["date"], obs["value"])
|
|
27
|
+
# unit: USD per troy ounce
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Oil & Gas
|
|
31
|
+
|
|
32
|
+
### WTI — Crude Oil (West Texas Intermediate)
|
|
33
|
+
|
|
34
|
+
**Optional:** `interval` (`daily`, `weekly`, `monthly`) — default: `monthly`
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
data = av_get("WTI", interval="daily")
|
|
38
|
+
for obs in data["data"][:10]:
|
|
39
|
+
print(obs["date"], obs["value"])
|
|
40
|
+
# unit: dollars per barrel
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### BRENT — Crude Oil (Brent)
|
|
44
|
+
|
|
45
|
+
**Optional:** `interval` (`daily`, `weekly`, `monthly`) — default: `monthly`
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
data = av_get("BRENT", interval="daily")
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### NATURAL_GAS — Henry Hub Natural Gas Spot Price
|
|
52
|
+
|
|
53
|
+
**Optional:** `interval` (`daily`, `weekly`, `monthly`) — default: `monthly`
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
data = av_get("NATURAL_GAS", interval="monthly")
|
|
57
|
+
# unit: dollars per million BTU
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Industrial Metals
|
|
61
|
+
|
|
62
|
+
### COPPER — Global Price of Copper
|
|
63
|
+
|
|
64
|
+
**Optional:** `interval` (`monthly`, `quarterly`, `annual`) — default: `monthly`
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
data = av_get("COPPER", interval="monthly")
|
|
68
|
+
# unit: USD per metric ton
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### ALUMINUM — Global Price of Aluminum
|
|
72
|
+
|
|
73
|
+
**Optional:** `interval` (`monthly`, `quarterly`, `annual`) — default: `monthly`
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
data = av_get("ALUMINUM", interval="monthly")
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Agricultural Commodities
|
|
80
|
+
|
|
81
|
+
### WHEAT — Global Price of Wheat
|
|
82
|
+
|
|
83
|
+
**Optional:** `interval` (`monthly`, `quarterly`, `annual`) — default: `monthly`
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
data = av_get("WHEAT", interval="monthly")
|
|
87
|
+
# unit: USD per metric ton
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### CORN — Global Price of Corn (Maize)
|
|
91
|
+
|
|
92
|
+
**Optional:** `interval` (`monthly`, `quarterly`, `annual`) — default: `monthly`
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
data = av_get("CORN", interval="monthly")
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### COTTON — Global Price of Cotton
|
|
99
|
+
|
|
100
|
+
**Optional:** `interval` (`monthly`, `quarterly`, `annual`) — default: `monthly`
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
data = av_get("COTTON", interval="monthly")
|
|
104
|
+
# unit: USD per pound
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### SUGAR — Global Price of Sugar
|
|
108
|
+
|
|
109
|
+
**Optional:** `interval` (`monthly`, `quarterly`, `annual`) — default: `monthly`
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
data = av_get("SUGAR", interval="monthly")
|
|
113
|
+
# unit: cents per pound
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### COFFEE — Global Price of Coffee
|
|
117
|
+
|
|
118
|
+
**Optional:** `interval` (`monthly`, `quarterly`, `annual`) — default: `monthly`
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
data = av_get("COFFEE", interval="monthly")
|
|
122
|
+
# unit: USD per pound
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## ALL_COMMODITIES — Global Price Index of All Commodities
|
|
126
|
+
|
|
127
|
+
IMF Primary Commodity Price Index.
|
|
128
|
+
|
|
129
|
+
**Optional:** `interval` (`monthly`, `quarterly`, `annual`) — default: `monthly`
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
data = av_get("ALL_COMMODITIES", interval="monthly")
|
|
133
|
+
# Composite index of all commodities
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Convert to DataFrame
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
import pandas as pd
|
|
140
|
+
|
|
141
|
+
def commodity_to_df(function, **kwargs):
|
|
142
|
+
data = av_get(function, **kwargs)
|
|
143
|
+
df = pd.DataFrame(data["data"])
|
|
144
|
+
df["date"] = pd.to_datetime(df["date"])
|
|
145
|
+
df["value"] = pd.to_numeric(df["value"], errors="coerce")
|
|
146
|
+
return df.set_index("date").sort_index()
|
|
147
|
+
|
|
148
|
+
# Compare oil prices
|
|
149
|
+
wti_df = commodity_to_df("WTI", interval="monthly")
|
|
150
|
+
brent_df = commodity_to_df("BRENT", interval="monthly")
|
|
151
|
+
spread = brent_df["value"] - wti_df["value"]
|
|
152
|
+
print(spread.tail())
|
|
153
|
+
```
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Economic Indicators APIs
|
|
2
|
+
|
|
3
|
+
All economic indicators return US data and follow the same response structure:
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"name": "Real Gross Domestic Product",
|
|
8
|
+
"interval": "annual",
|
|
9
|
+
"unit": "billions of chained 2012 dollars",
|
|
10
|
+
"data": [{"date": "2023-01-01", "value": "22067.1"}, ...]
|
|
11
|
+
}
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## GDP
|
|
15
|
+
|
|
16
|
+
### REAL_GDP — Real Gross Domestic Product
|
|
17
|
+
|
|
18
|
+
Source: US Bureau of Economic Analysis via FRED.
|
|
19
|
+
|
|
20
|
+
**Optional:** `interval` (`annual`, `quarterly`) — default: `annual`
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
data = av_get("REAL_GDP", interval="quarterly")
|
|
24
|
+
latest = data["data"][0]
|
|
25
|
+
print(latest["date"], latest["value"])
|
|
26
|
+
# unit: billions of chained 2012 dollars
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### REAL_GDP_PER_CAPITA — Real GDP Per Capita
|
|
30
|
+
|
|
31
|
+
**No interval parameter** — quarterly data only.
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
data = av_get("REAL_GDP_PER_CAPITA")
|
|
35
|
+
# unit: chained 2012 dollars
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Interest Rates
|
|
39
|
+
|
|
40
|
+
### TREASURY_YIELD — US Treasury Yield
|
|
41
|
+
|
|
42
|
+
**Optional:**
|
|
43
|
+
- `interval` (`daily`, `weekly`, `monthly`) — default: `monthly`
|
|
44
|
+
- `maturity` (`3month`, `2year`, `5year`, `7year`, `10year`, `30year`) — default: `10year`
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
# 10-year treasury yield (daily)
|
|
48
|
+
data = av_get("TREASURY_YIELD", interval="daily", maturity="10year")
|
|
49
|
+
for obs in data["data"][:5]:
|
|
50
|
+
print(obs["date"], obs["value"])
|
|
51
|
+
# unit: percent
|
|
52
|
+
|
|
53
|
+
# 2-year vs 10-year spread (yield curve)
|
|
54
|
+
two_yr = av_get("TREASURY_YIELD", interval="monthly", maturity="2year")
|
|
55
|
+
ten_yr = av_get("TREASURY_YIELD", interval="monthly", maturity="10year")
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### FEDERAL_FUNDS_RATE — Federal Funds Rate
|
|
59
|
+
|
|
60
|
+
**Optional:** `interval` (`daily`, `weekly`, `monthly`) — default: `monthly`
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
data = av_get("FEDERAL_FUNDS_RATE", interval="monthly")
|
|
64
|
+
# unit: percent
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Inflation
|
|
68
|
+
|
|
69
|
+
### CPI — Consumer Price Index
|
|
70
|
+
|
|
71
|
+
**Optional:** `interval` (`monthly`, `semiannual`) — default: `monthly`
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
data = av_get("CPI", interval="monthly")
|
|
75
|
+
# unit: index 1982-1984 = 100
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### INFLATION — Annual Inflation Rate
|
|
79
|
+
|
|
80
|
+
**No parameters** — annual data only.
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
data = av_get("INFLATION")
|
|
84
|
+
# unit: percent (YoY change in CPI)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Labor Market
|
|
88
|
+
|
|
89
|
+
### UNEMPLOYMENT — Unemployment Rate
|
|
90
|
+
|
|
91
|
+
**No parameters** — monthly data only.
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
data = av_get("UNEMPLOYMENT")
|
|
95
|
+
latest = data["data"][0]
|
|
96
|
+
print(latest["date"], latest["value"])
|
|
97
|
+
# unit: percent
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### NONFARM_PAYROLL — Nonfarm Payroll
|
|
101
|
+
|
|
102
|
+
**No parameters** — monthly data only.
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
data = av_get("NONFARM_PAYROLL")
|
|
106
|
+
# unit: thousands of persons
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Consumer Spending
|
|
110
|
+
|
|
111
|
+
### RETAIL_SALES — Monthly Retail Sales
|
|
112
|
+
|
|
113
|
+
**No parameters** — monthly data only.
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
data = av_get("RETAIL_SALES")
|
|
117
|
+
# unit: millions of dollars
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### DURABLES — Durable Goods Orders
|
|
121
|
+
|
|
122
|
+
**No parameters** — monthly data only.
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
data = av_get("DURABLES")
|
|
126
|
+
# unit: millions of dollars
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Macro Dashboard Example
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
import pandas as pd
|
|
133
|
+
|
|
134
|
+
def econ_to_series(function, **kwargs):
|
|
135
|
+
data = av_get(function, **kwargs)
|
|
136
|
+
df = pd.DataFrame(data["data"])
|
|
137
|
+
df["date"] = pd.to_datetime(df["date"])
|
|
138
|
+
df["value"] = pd.to_numeric(df["value"], errors="coerce")
|
|
139
|
+
return df.set_index("date")["value"].sort_index()
|
|
140
|
+
|
|
141
|
+
# Build economic snapshot
|
|
142
|
+
gdp = econ_to_series("REAL_GDP", interval="quarterly")
|
|
143
|
+
fed_funds = econ_to_series("FEDERAL_FUNDS_RATE", interval="monthly")
|
|
144
|
+
unemployment = econ_to_series("UNEMPLOYMENT")
|
|
145
|
+
cpi = econ_to_series("CPI", interval="monthly")
|
|
146
|
+
ten_yr = econ_to_series("TREASURY_YIELD", interval="monthly", maturity="10year")
|
|
147
|
+
|
|
148
|
+
print(f"Latest GDP: {gdp.iloc[-1]:.1f} billion (chained 2012$)")
|
|
149
|
+
print(f"Fed Funds Rate: {fed_funds.iloc[-1]:.2f}%")
|
|
150
|
+
print(f"Unemployment: {unemployment.iloc[-1]:.1f}%")
|
|
151
|
+
print(f"CPI: {cpi.iloc[-1]:.1f}")
|
|
152
|
+
print(f"10-Year Treasury: {ten_yr.iloc[-1]:.2f}%")
|
|
153
|
+
|
|
154
|
+
# Yield curve inversion check
|
|
155
|
+
two_yr = econ_to_series("TREASURY_YIELD", interval="monthly", maturity="2year")
|
|
156
|
+
spread = ten_yr - two_yr
|
|
157
|
+
print(f"Yield curve spread (10yr - 2yr): {spread.iloc[-1]:.2f}% ({'inverted' if spread.iloc[-1] < 0 else 'normal'})")
|
|
158
|
+
```
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Forex (FX) & Cryptocurrency APIs
|
|
2
|
+
|
|
3
|
+
## Foreign Exchange Rates
|
|
4
|
+
|
|
5
|
+
### CURRENCY_EXCHANGE_RATE — Realtime Exchange Rate
|
|
6
|
+
|
|
7
|
+
Returns the realtime exchange rate for any currency pair (fiat or crypto).
|
|
8
|
+
|
|
9
|
+
**Required:** `from_currency`, `to_currency`
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
# Fiat to fiat
|
|
13
|
+
data = av_get("CURRENCY_EXCHANGE_RATE", from_currency="USD", to_currency="EUR")
|
|
14
|
+
rate_info = data["Realtime Currency Exchange Rate"]
|
|
15
|
+
print(rate_info["5. Exchange Rate"]) # e.g., "0.92"
|
|
16
|
+
print(rate_info["6. Last Refreshed"])
|
|
17
|
+
print(rate_info["8. Bid Price"])
|
|
18
|
+
print(rate_info["9. Ask Price"])
|
|
19
|
+
# Full fields: "1. From_Currency Code", "2. From_Currency Name",
|
|
20
|
+
# "3. To_Currency Code", "4. To_Currency Name",
|
|
21
|
+
# "5. Exchange Rate", "6. Last Refreshed",
|
|
22
|
+
# "7. Time Zone", "8. Bid Price", "9. Ask Price"
|
|
23
|
+
|
|
24
|
+
# Crypto to fiat
|
|
25
|
+
data = av_get("CURRENCY_EXCHANGE_RATE", from_currency="BTC", to_currency="USD")
|
|
26
|
+
print(data["Realtime Currency Exchange Rate"]["5. Exchange Rate"])
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### FX_INTRADAY — Intraday Forex OHLCV (Premium)
|
|
30
|
+
|
|
31
|
+
**Required:** `from_symbol`, `to_symbol`, `interval` (`1min`, `5min`, `15min`, `30min`, `60min`)
|
|
32
|
+
|
|
33
|
+
**Optional:** `outputsize` (`compact`/`full`), `datatype`
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
data = av_get("FX_INTRADAY", from_symbol="EUR", to_symbol="USD", interval="5min")
|
|
37
|
+
ts = data["Time Series FX (5min)"]
|
|
38
|
+
# Key: "2024-01-15 16:00:00" → {"1. open", "2. high", "3. low", "4. close"}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### FX_DAILY — Daily Forex OHLCV
|
|
42
|
+
|
|
43
|
+
**Required:** `from_symbol`, `to_symbol`
|
|
44
|
+
|
|
45
|
+
**Optional:** `outputsize` (`compact`/`full`), `datatype`
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
data = av_get("FX_DAILY", from_symbol="EUR", to_symbol="USD", outputsize="full")
|
|
49
|
+
ts = data["Time Series FX (Daily)"]
|
|
50
|
+
# Key: "2024-01-15" → {"1. open", "2. high", "3. low", "4. close"}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### FX_WEEKLY — Weekly Forex OHLCV
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
data = av_get("FX_WEEKLY", from_symbol="EUR", to_symbol="USD")
|
|
57
|
+
ts = data["Time Series FX (Weekly)"]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### FX_MONTHLY — Monthly Forex OHLCV
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
data = av_get("FX_MONTHLY", from_symbol="EUR", to_symbol="USD")
|
|
64
|
+
ts = data["Time Series FX (Monthly)"]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Common Currency Codes
|
|
68
|
+
|
|
69
|
+
| Code | Currency |
|
|
70
|
+
|------|---------|
|
|
71
|
+
| USD | US Dollar |
|
|
72
|
+
| EUR | Euro |
|
|
73
|
+
| GBP | British Pound |
|
|
74
|
+
| JPY | Japanese Yen |
|
|
75
|
+
| CHF | Swiss Franc |
|
|
76
|
+
| CAD | Canadian Dollar |
|
|
77
|
+
| AUD | Australian Dollar |
|
|
78
|
+
| CNY | Chinese Yuan |
|
|
79
|
+
| HKD | Hong Kong Dollar |
|
|
80
|
+
| BTC | Bitcoin |
|
|
81
|
+
| ETH | Ethereum |
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Cryptocurrency
|
|
86
|
+
|
|
87
|
+
### CRYPTO_INTRADAY — Crypto Intraday OHLCV (Premium)
|
|
88
|
+
|
|
89
|
+
**Required:** `symbol`, `market`, `interval` (`1min`, `5min`, `15min`, `30min`, `60min`)
|
|
90
|
+
|
|
91
|
+
**Optional:** `outputsize` (`compact`/`full`), `datatype`
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
data = av_get("CRYPTO_INTRADAY", symbol="ETH", market="USD", interval="5min")
|
|
95
|
+
ts = data["Time Series Crypto (5min)"]
|
|
96
|
+
# Key: "2024-01-15 16:00:00" → {"1. open", "2. high", "3. low", "4. close", "5. volume"}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### DIGITAL_CURRENCY_DAILY — Daily Crypto OHLCV
|
|
100
|
+
|
|
101
|
+
**Required:** `symbol`, `market`
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
data = av_get("DIGITAL_CURRENCY_DAILY", symbol="BTC", market="USD")
|
|
105
|
+
ts = data["Time Series (Digital Currency Daily)"]
|
|
106
|
+
# Key: "2024-01-15" → {
|
|
107
|
+
# "1a. open (USD)", "1b. open (USD)",
|
|
108
|
+
# "2a. high (USD)", "2b. high (USD)",
|
|
109
|
+
# "3a. low (USD)", "3b. low (USD)",
|
|
110
|
+
# "4a. close (USD)", "4b. close (USD)",
|
|
111
|
+
# "5. volume", "6. market cap (USD)"
|
|
112
|
+
# }
|
|
113
|
+
|
|
114
|
+
# Convert to DataFrame
|
|
115
|
+
import pandas as pd
|
|
116
|
+
df = pd.DataFrame.from_dict(ts, orient="index")
|
|
117
|
+
df.index = pd.to_datetime(df.index)
|
|
118
|
+
df = df.sort_index()
|
|
119
|
+
# Extract close price
|
|
120
|
+
df["close"] = pd.to_numeric(df["4a. close (USD)"])
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### DIGITAL_CURRENCY_WEEKLY — Weekly Crypto OHLCV
|
|
124
|
+
|
|
125
|
+
**Required:** `symbol`, `market`
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
data = av_get("DIGITAL_CURRENCY_WEEKLY", symbol="BTC", market="USD")
|
|
129
|
+
ts = data["Time Series (Digital Currency Weekly)"]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### DIGITAL_CURRENCY_MONTHLY — Monthly Crypto OHLCV
|
|
133
|
+
|
|
134
|
+
**Required:** `symbol`, `market`
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
data = av_get("DIGITAL_CURRENCY_MONTHLY", symbol="ETH", market="USD")
|
|
138
|
+
ts = data["Time Series (Digital Currency Monthly)"]
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Common Crypto Symbols
|
|
142
|
+
|
|
143
|
+
| Symbol | Name |
|
|
144
|
+
|--------|------|
|
|
145
|
+
| BTC | Bitcoin |
|
|
146
|
+
| ETH | Ethereum |
|
|
147
|
+
| BNB | Binance Coin |
|
|
148
|
+
| XRP | Ripple |
|
|
149
|
+
| ADA | Cardano |
|
|
150
|
+
| SOL | Solana |
|
|
151
|
+
| DOGE | Dogecoin |
|
|
152
|
+
| AVAX | Avalanche |
|
|
153
|
+
| DOT | Polkadot |
|
|
154
|
+
| MATIC | Polygon |
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Fundamental Data APIs
|
|
2
|
+
|
|
3
|
+
## OVERVIEW — Company Overview
|
|
4
|
+
|
|
5
|
+
Returns key company information, valuation metrics, and financial ratios.
|
|
6
|
+
|
|
7
|
+
**Required:** `symbol`
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
data = av_get("OVERVIEW", symbol="AAPL")
|
|
11
|
+
|
|
12
|
+
# Key fields returned:
|
|
13
|
+
# "Symbol", "AssetType", "Name", "Description", "Exchange", "Currency"
|
|
14
|
+
# "Country", "Sector", "Industry", "Address"
|
|
15
|
+
# "MarketCapitalization", "EBITDA", "PERatio", "PEGRatio"
|
|
16
|
+
# "BookValue", "DividendPerShare", "DividendYield", "EPS"
|
|
17
|
+
# "RevenuePerShareTTM", "ProfitMargin", "OperatingMarginTTM"
|
|
18
|
+
# "ReturnOnAssetsTTM", "ReturnOnEquityTTM"
|
|
19
|
+
# "RevenueTTM", "GrossProfitTTM", "DilutedEPSTTM"
|
|
20
|
+
# "QuarterlyEarningsGrowthYOY", "QuarterlyRevenueGrowthYOY"
|
|
21
|
+
# "AnalystTargetPrice", "AnalystRatingStrongBuy", "AnalystRatingBuy",
|
|
22
|
+
# "AnalystRatingHold", "AnalystRatingSell", "AnalystRatingStrongSell"
|
|
23
|
+
# "TrailingPE", "ForwardPE", "PriceToSalesRatioTTM"
|
|
24
|
+
# "PriceToBookRatio", "EVToRevenue", "EVToEBITDA"
|
|
25
|
+
# "Beta", "52WeekHigh", "52WeekLow", "50DayMovingAverage", "200DayMovingAverage"
|
|
26
|
+
# "SharesOutstanding", "DividendDate", "ExDividendDate", "FiscalYearEnd"
|
|
27
|
+
|
|
28
|
+
print(data["MarketCapitalization"]) # "2850000000000"
|
|
29
|
+
print(data["PERatio"]) # "29.50"
|
|
30
|
+
print(data["Sector"]) # "TECHNOLOGY"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## ETF_PROFILE — ETF Profile & Holdings
|
|
34
|
+
|
|
35
|
+
**Required:** `symbol`
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
data = av_get("ETF_PROFILE", symbol="QQQ")
|
|
39
|
+
# Fields: "net_assets", "nav", "inception_date", "description",
|
|
40
|
+
# "asset_allocation" (stocks/bonds/cash/etc.)
|
|
41
|
+
# "sectors" (list of sector weights)
|
|
42
|
+
# "holdings" (top holdings list)
|
|
43
|
+
for h in data["holdings"][:5]:
|
|
44
|
+
print(h["symbol"], h["description"], h["weight"])
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## DIVIDENDS — Corporate Dividend History
|
|
48
|
+
|
|
49
|
+
**Required:** `symbol`
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
data = av_get("DIVIDENDS", symbol="IBM")
|
|
53
|
+
divs = data["data"]
|
|
54
|
+
for d in divs:
|
|
55
|
+
print(d["ex_dividend_date"], d["amount"])
|
|
56
|
+
# Fields per record: "ex_dividend_date", "declaration_date",
|
|
57
|
+
# "record_date", "payment_date", "amount"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## SPLITS — Stock Split History
|
|
61
|
+
|
|
62
|
+
**Required:** `symbol`
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
data = av_get("SPLITS", symbol="AAPL")
|
|
66
|
+
splits = data["data"]
|
|
67
|
+
for s in splits:
|
|
68
|
+
print(s["effective_date"], s["split_factor"])
|
|
69
|
+
# Fields: "effective_date", "split_factor" (e.g., "4/1" for 4-for-1 split)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## INCOME_STATEMENT — Income Statement
|
|
73
|
+
|
|
74
|
+
Returns annual and quarterly income statements.
|
|
75
|
+
|
|
76
|
+
**Required:** `symbol`
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
data = av_get("INCOME_STATEMENT", symbol="IBM")
|
|
80
|
+
annual = data["annualReports"] # list, most recent first
|
|
81
|
+
quarterly = data["quarterlyReports"] # list, most recent first
|
|
82
|
+
|
|
83
|
+
yr = annual[0] # Most recent fiscal year
|
|
84
|
+
print(yr["fiscalDateEnding"]) # "2023-12-31"
|
|
85
|
+
print(yr["totalRevenue"]) # "61860000000"
|
|
86
|
+
print(yr["grossProfit"]) # "32688000000"
|
|
87
|
+
print(yr["operatingIncome"]) # "..."
|
|
88
|
+
print(yr["netIncome"]) # "..."
|
|
89
|
+
print(yr["ebitda"]) # "..."
|
|
90
|
+
# Other keys: "reportedCurrency", "costOfRevenue", "costofGoodsAndServicesSold",
|
|
91
|
+
# "sellingGeneralAndAdministrative", "researchAndDevelopment",
|
|
92
|
+
# "operatingExpenses", "investmentIncomeNet", "netInterestIncome",
|
|
93
|
+
# "interestIncome", "interestExpense", "nonInterestIncome",
|
|
94
|
+
# "otherNonOperatingIncome", "depreciation",
|
|
95
|
+
# "depreciationAndAmortization", "incomeBeforeTax",
|
|
96
|
+
# "incomeTaxExpense", "interestAndDebtExpense",
|
|
97
|
+
# "netIncomeFromContinuingOperations", "comprehensiveIncomeNetOfTax",
|
|
98
|
+
# "ebit", "dilutedEPS", "basicEPS"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## BALANCE_SHEET — Balance Sheet
|
|
102
|
+
|
|
103
|
+
**Required:** `symbol`
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
data = av_get("BALANCE_SHEET", symbol="IBM")
|
|
107
|
+
annual = data["annualReports"]
|
|
108
|
+
|
|
109
|
+
yr = annual[0]
|
|
110
|
+
print(yr["totalAssets"]) # "..."
|
|
111
|
+
print(yr["totalLiabilities"]) # "..."
|
|
112
|
+
print(yr["totalShareholderEquity"]) # "..."
|
|
113
|
+
# Other keys: "reportedCurrency", "fiscalDateEnding",
|
|
114
|
+
# "cashAndCashEquivalentsAtCarryingValue", "cashAndShortTermInvestments",
|
|
115
|
+
# "inventory", "currentNetReceivables", "totalCurrentAssets",
|
|
116
|
+
# "propertyPlantEquipmentNet", "intangibleAssets",
|
|
117
|
+
# "intangibleAssetsExcludingGoodwill", "goodwill", "investments",
|
|
118
|
+
# "longTermInvestments", "shortTermInvestments", "otherCurrentAssets",
|
|
119
|
+
# "otherNonCurrrentAssets", "currentAccountsPayable", "deferredRevenue",
|
|
120
|
+
# "currentDebt", "shortTermDebt", "totalCurrentLiabilities",
|
|
121
|
+
# "capitalLeaseObligations", "longTermDebt", "currentLongTermDebt",
|
|
122
|
+
# "longTermDebtNoncurrent", "shortLongTermDebtTotal",
|
|
123
|
+
# "otherCurrentLiabilities", "otherNonCurrentLiabilities",
|
|
124
|
+
# "totalNonCurrentLiabilities", "retainedEarnings",
|
|
125
|
+
# "additionalPaidInCapital", "commonStockSharesOutstanding"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## CASH_FLOW — Cash Flow Statement
|
|
129
|
+
|
|
130
|
+
**Required:** `symbol`
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
data = av_get("CASH_FLOW", symbol="IBM")
|
|
134
|
+
annual = data["annualReports"]
|
|
135
|
+
|
|
136
|
+
yr = annual[0]
|
|
137
|
+
print(yr["operatingCashflow"]) # "..."
|
|
138
|
+
print(yr["capitalExpenditures"]) # "..."
|
|
139
|
+
print(yr["cashflowFromInvestment"]) # "..."
|
|
140
|
+
print(yr["cashflowFromFinancing"]) # "..."
|
|
141
|
+
# Other keys: "reportedCurrency", "fiscalDateEnding",
|
|
142
|
+
# "paymentsForRepurchaseOfCommonStock", "dividendPayout",
|
|
143
|
+
# "dividendPayoutCommonStock", "dividendPayoutPreferredStock",
|
|
144
|
+
# "proceedsFromIssuanceOfCommonStock", "changeInOperatingLiabilities",
|
|
145
|
+
# "changeInOperatingAssets", "depreciationDepletionAndAmortization",
|
|
146
|
+
# "capitalExpenditures", "changeInReceivables", "changeInInventory",
|
|
147
|
+
# "profitLoss", "netIncomeFromContinuingOperations"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## SHARES_OUTSTANDING — Shares Outstanding History
|
|
151
|
+
|
|
152
|
+
**Required:** `symbol`
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
data = av_get("SHARES_OUTSTANDING", symbol="AAPL")
|
|
156
|
+
shares = data["data"]
|
|
157
|
+
for s in shares[:5]:
|
|
158
|
+
print(s["date"], s["reportedShares"])
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## EARNINGS — Earnings History (EPS)
|
|
162
|
+
|
|
163
|
+
Returns annual and quarterly EPS + surprise data.
|
|
164
|
+
|
|
165
|
+
**Required:** `symbol`
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
data = av_get("EARNINGS", symbol="IBM")
|
|
169
|
+
annual = data["annualEarnings"]
|
|
170
|
+
quarterly = data["quarterlyEarnings"]
|
|
171
|
+
|
|
172
|
+
# Annual: "fiscalDateEnding", "reportedEPS"
|
|
173
|
+
# Quarterly: "fiscalDateEnding", "reportedDate", "reportedEPS",
|
|
174
|
+
# "estimatedEPS", "surprise", "surprisePercentage"
|
|
175
|
+
q = quarterly[0]
|
|
176
|
+
print(q["reportedEPS"], q["estimatedEPS"], q["surprisePercentage"])
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## EARNINGS_CALENDAR — Upcoming Earnings Dates
|
|
180
|
+
|
|
181
|
+
Returns earnings release schedule for the next 3-12 months.
|
|
182
|
+
|
|
183
|
+
**Optional:** `symbol` (if omitted, returns all companies), `horizon` (`3month`, `6month`, `12month`)
|
|
184
|
+
|
|
185
|
+
```python
|
|
186
|
+
# Returns CSV format - use requests directly
|
|
187
|
+
import requests, csv, io, os
|
|
188
|
+
resp = requests.get(
|
|
189
|
+
"https://www.alphavantage.co/query",
|
|
190
|
+
params={"function": "EARNINGS_CALENDAR", "symbol": "IBM", "apikey": os.environ["ALPHAVANTAGE_API_KEY"]}
|
|
191
|
+
)
|
|
192
|
+
reader = csv.DictReader(io.StringIO(resp.text))
|
|
193
|
+
for row in reader:
|
|
194
|
+
print(row["symbol"], row["name"], row["reportDate"], row["estimate"])
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## LISTING_STATUS — Listed/Delisted Tickers
|
|
198
|
+
|
|
199
|
+
**Optional:** `date` (format `YYYY-MM-DD`), `state` (`active` or `delisted`)
|
|
200
|
+
|
|
201
|
+
```python
|
|
202
|
+
# Returns CSV
|
|
203
|
+
resp = requests.get(
|
|
204
|
+
"https://www.alphavantage.co/query",
|
|
205
|
+
params={"function": "LISTING_STATUS", "state": "active", "apikey": API_KEY}
|
|
206
|
+
)
|
|
207
|
+
reader = csv.DictReader(io.StringIO(resp.text))
|
|
208
|
+
# Fields: "symbol", "name", "exchange", "assetType", "ipoDate",
|
|
209
|
+
# "delistingDate", "status"
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## IPO_CALENDAR — Upcoming IPOs
|
|
213
|
+
|
|
214
|
+
```python
|
|
215
|
+
# Returns CSV
|
|
216
|
+
resp = requests.get(
|
|
217
|
+
"https://www.alphavantage.co/query",
|
|
218
|
+
params={"function": "IPO_CALENDAR", "apikey": API_KEY}
|
|
219
|
+
)
|
|
220
|
+
reader = csv.DictReader(io.StringIO(resp.text))
|
|
221
|
+
for row in reader:
|
|
222
|
+
print(row["symbol"], row["name"], row["ipoDate"], row["priceRangeLow"], row["priceRangeHigh"])
|
|
223
|
+
```
|