superkit-mcp-server 1.0.2 → 1.1.0
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/ARCHITECTURE.md +102 -102
- package/README.md +67 -63
- package/SUPERKIT.md +168 -168
- package/agents/code-archaeologist.md +106 -0
- package/agents/coder.md +90 -90
- package/agents/data-engineer.md +28 -28
- package/agents/devops-engineer.md +242 -0
- package/agents/git-manager.md +203 -203
- package/agents/orchestrator.md +4 -0
- package/agents/penetration-tester.md +188 -0
- package/agents/performance-optimizer.md +187 -0
- package/agents/planner.md +270 -270
- package/agents/qa-automation-engineer.md +103 -0
- package/agents/quant-developer.md +32 -28
- package/agents/reviewer.md +100 -100
- package/agents/scout.md +222 -222
- package/agents/tester.md +274 -274
- package/agents/ui-designer.md +208 -208
- package/build/index.js +53 -1
- package/build/tools/validators/__tests__/apiSchema.test.js +23 -23
- package/build/tools/validators/__tests__/convertRules.test.js +5 -5
- package/build/tools/validators/__tests__/frontendDesign.test.js +12 -12
- package/build/tools/validators/__tests__/geoChecker.test.js +19 -19
- package/build/tools/validators/__tests__/mobileAudit.test.js +12 -12
- package/build/tools/validators/__tests__/reactPerformanceChecker.test.js +17 -17
- package/build/tools/validators/__tests__/securityScan.test.js +6 -6
- package/build/tools/validators/__tests__/seoChecker.test.js +16 -16
- package/build/tools/validators/__tests__/typeCoverage.test.js +14 -14
- package/package.json +33 -33
- package/skills/meta/README.md +30 -30
- package/skills/meta/api-design/SKILL.md +134 -134
- package/skills/meta/code-review/SKILL.md +44 -37
- package/skills/meta/code-review/checklists/pre-merge.md +25 -25
- package/skills/meta/code-review/workflows/architecture-pass.md +26 -26
- package/skills/meta/code-review/workflows/performance-pass.md +27 -27
- package/skills/meta/code-review/workflows/security-pass.md +29 -29
- package/skills/meta/compound-docs/SKILL.md +133 -133
- package/skills/meta/debug/SKILL.md +40 -40
- package/skills/meta/debug/templates/bug-report.template.md +31 -31
- package/skills/meta/debug/workflows/reproduce-issue.md +20 -20
- package/skills/meta/docker/SKILL.md +126 -126
- package/skills/meta/examples/supabase/SKILL.md +46 -46
- package/skills/meta/examples/supabase/references/best-practices.md +319 -319
- package/skills/meta/examples/supabase/references/common-patterns.md +373 -373
- package/skills/meta/examples/supabase/templates/migration-template.sql +49 -49
- package/skills/meta/examples/supabase/templates/rls-policy-template.sql +77 -77
- package/skills/meta/examples/supabase/workflows/debugging.md +260 -260
- package/skills/meta/examples/supabase/workflows/migration-workflow.md +211 -211
- package/skills/meta/examples/supabase/workflows/rls-policies.md +244 -244
- package/skills/meta/examples/supabase/workflows/schema-design.md +321 -321
- package/skills/meta/file-todos/SKILL.md +88 -88
- package/skills/meta/mobile/SKILL.md +140 -140
- package/skills/meta/nextjs/SKILL.md +101 -101
- package/skills/meta/performance/SKILL.md +130 -130
- package/skills/meta/react-patterns/SKILL.md +83 -83
- package/skills/meta/security/SKILL.md +114 -114
- package/skills/meta/session-resume/SKILL.md +96 -96
- package/skills/meta/tailwind/SKILL.md +139 -139
- package/skills/meta/testing/SKILL.md +43 -43
- package/skills/meta/testing/references/vitest-patterns.md +45 -45
- package/skills/meta/testing/templates/component-test.template.tsx +37 -37
- 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/README.md +191 -191
- package/workflows/adr.md +174 -174
- package/workflows/changelog.md +74 -74
- package/workflows/compound.md +323 -323
- package/workflows/compound_health.md +74 -74
- package/workflows/create-agent-skill.md +139 -139
- package/workflows/cycle.md +144 -144
- package/workflows/deploy-docs.md +84 -84
- package/workflows/development-rules.md +37 -37
- package/workflows/doc.md +95 -95
- package/workflows/documentation-management.md +29 -29
- package/workflows/explore.md +146 -146
- package/workflows/generate_command.md +106 -106
- package/workflows/heal-skill.md +97 -97
- package/workflows/housekeeping.md +229 -229
- package/workflows/kit-setup.md +102 -102
- package/workflows/map-codebase.md +78 -0
- package/workflows/orchestration-protocol.md +38 -38
- package/workflows/plan-compound.md +439 -433
- package/workflows/plan_review.md +269 -248
- package/workflows/primary-workflow.md +32 -32
- package/workflows/promote_pattern.md +86 -86
- package/workflows/release-docs.md +82 -82
- package/workflows/report-bug.md +135 -135
- package/workflows/reproduce-bug.md +118 -118
- package/workflows/resolve_pr.md +133 -133
- package/workflows/resolve_todo.md +128 -128
- package/workflows/review-compound.md +376 -359
- package/workflows/skill-review.md +127 -127
- package/workflows/specs.md +257 -257
- package/workflows/triage-sprint.md +102 -102
- package/workflows/triage.md +152 -152
- package/workflows/work.md +399 -399
- package/workflows/xcode-test.md +93 -93
|
@@ -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
|
+
```
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Alpha Intelligence™ APIs
|
|
2
|
+
|
|
3
|
+
## NEWS_SENTIMENT — Market News & Sentiment
|
|
4
|
+
|
|
5
|
+
Returns live/historical news articles with sentiment scores for tickers, sectors, and topics.
|
|
6
|
+
|
|
7
|
+
**Optional:**
|
|
8
|
+
- `tickers` — comma-separated ticker symbols (e.g., `IBM,AAPL`)
|
|
9
|
+
- `topics` — comma-separated topics: `blockchain`, `earnings`, `ipo`, `mergers_and_acquisitions`, `financial_markets`, `economy_fiscal`, `economy_monetary`, `economy_macro`, `energy_transportation`, `finance`, `life_sciences`, `manufacturing`, `real_estate`, `retail_wholesale`, `technology`
|
|
10
|
+
- `time_from` / `time_to` — format `YYYYMMDDTHHMM`
|
|
11
|
+
- `sort` — `LATEST`, `EARLIEST`, or `RELEVANCE`
|
|
12
|
+
- `limit` — max articles returned (default 50, max 1000)
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
# Get news for specific ticker
|
|
16
|
+
data = av_get("NEWS_SENTIMENT", tickers="AAPL", sort="LATEST", limit=10)
|
|
17
|
+
articles = data["feed"]
|
|
18
|
+
|
|
19
|
+
for a in articles[:3]:
|
|
20
|
+
print(a["title"])
|
|
21
|
+
print(a["url"])
|
|
22
|
+
print(a["time_published"])
|
|
23
|
+
print(a["overall_sentiment_label"]) # "Bullish", "Bearish", "Neutral", etc.
|
|
24
|
+
print(a["overall_sentiment_score"]) # -1.0 to 1.0
|
|
25
|
+
for ts in a["ticker_sentiment"]:
|
|
26
|
+
if ts["ticker"] == "AAPL":
|
|
27
|
+
print(f" AAPL sentiment: {ts['ticker_sentiment_label']} ({ts['ticker_sentiment_score']})")
|
|
28
|
+
print(f" Relevance: {ts['relevance_score']}")
|
|
29
|
+
|
|
30
|
+
# Article fields: "title", "url", "time_published", "authors", "summary",
|
|
31
|
+
# "source", "source_domain", "topics", "overall_sentiment_score",
|
|
32
|
+
# "overall_sentiment_label", "ticker_sentiment"
|
|
33
|
+
# Sentiment labels: "Bearish", "Somewhat-Bearish", "Neutral", "Somewhat-Bullish", "Bullish"
|
|
34
|
+
|
|
35
|
+
# Get news by topic
|
|
36
|
+
data = av_get("NEWS_SENTIMENT", topics="earnings,technology", time_from="20240101T0000", limit=50)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## EARNINGS_CALL_TRANSCRIPT — Earnings Call Transcript
|
|
40
|
+
|
|
41
|
+
Returns full earnings call transcripts (requires premium).
|
|
42
|
+
|
|
43
|
+
**Required:** `symbol`, `quarter` (format `YYYYQN`, e.g., `2023Q4`)
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
data = av_get("EARNINGS_CALL_TRANSCRIPT", symbol="AAPL", quarter="2023Q4")
|
|
47
|
+
transcript = data["transcript"]
|
|
48
|
+
|
|
49
|
+
for segment in transcript[:5]:
|
|
50
|
+
print(f"[{segment['speaker']}]: {segment['content'][:200]}")
|
|
51
|
+
# Fields: "symbol", "quarter", "transcript" (list of {speaker, title, content})
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## TOP_GAINERS_LOSERS — Top Market Movers
|
|
55
|
+
|
|
56
|
+
Returns top 20 gainers, losers, and most actively traded US stocks for the current/most recent trading day.
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
data = av_get("TOP_GAINERS_LOSERS")
|
|
60
|
+
|
|
61
|
+
for g in data["top_gainers"][:5]:
|
|
62
|
+
print(g["ticker"], g["price"], g["change_amount"], g["change_percentage"], g["volume"])
|
|
63
|
+
|
|
64
|
+
for l in data["top_losers"][:5]:
|
|
65
|
+
print(l["ticker"], l["price"], l["change_amount"], l["change_percentage"])
|
|
66
|
+
|
|
67
|
+
# Fields: "ticker", "price", "change_amount", "change_percentage", "volume"
|
|
68
|
+
# Also: data["most_actively_traded"]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## INSIDER_TRANSACTIONS — Insider Trading Data
|
|
72
|
+
|
|
73
|
+
Returns insider transactions (Form 4) for a given company (requires premium).
|
|
74
|
+
|
|
75
|
+
**Required:** `symbol`
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
data = av_get("INSIDER_TRANSACTIONS", symbol="AAPL")
|
|
79
|
+
transactions = data["data"]
|
|
80
|
+
|
|
81
|
+
for t in transactions[:5]:
|
|
82
|
+
print(
|
|
83
|
+
t["transaction_date"],
|
|
84
|
+
t["executive"], # insider name
|
|
85
|
+
t["executive_title"], # e.g., "CEO"
|
|
86
|
+
t["action"], # "Buy" or "Sell"
|
|
87
|
+
t["shares"],
|
|
88
|
+
t["share_price"],
|
|
89
|
+
t["total_value"]
|
|
90
|
+
)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## ANALYTICS_FIXED_WINDOW — Portfolio Analytics (Fixed Window)
|
|
94
|
+
|
|
95
|
+
Returns mean return, variance, covariance, correlation, and alpha/beta for a set of tickers over a fixed historical window.
|
|
96
|
+
|
|
97
|
+
**Required:**
|
|
98
|
+
- `SYMBOLS` — comma-separated tickers (e.g., `AAPL,MSFT,IBM`)
|
|
99
|
+
- `RANGE` — date range format: `2year`, `6month`, `30day`, or `YYYY-MM-DD&YYYY-MM-DD`
|
|
100
|
+
- `INTERVAL` — `DAILY`, `WEEKLY`, or `MONTHLY`
|
|
101
|
+
- `OHLC` — `close`, `open`, `high`, or `low`
|
|
102
|
+
- `CALCULATIONS` — comma-separated: `MEAN`, `STDDEV`, `MAX_DRAWDOWN`, `CORRELATION`, `COVARIANCE`, `VARIANCE`, `CUMULATIVE_RETURN`, `MIN`, `MAX`, `MEDIAN`, `HISTOGRAM`
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
data = av_get(
|
|
106
|
+
"ANALYTICS_FIXED_WINDOW",
|
|
107
|
+
SYMBOLS="AAPL,MSFT,IBM",
|
|
108
|
+
RANGE="1year",
|
|
109
|
+
INTERVAL="DAILY",
|
|
110
|
+
OHLC="close",
|
|
111
|
+
CALCULATIONS="MEAN,STDDEV,CORRELATION,MAX_DRAWDOWN"
|
|
112
|
+
)
|
|
113
|
+
payload = data["payload"]
|
|
114
|
+
print(payload["MEAN"]) # {"AAPL": 0.0012, "MSFT": 0.0009, ...}
|
|
115
|
+
print(payload["STDDEV"])
|
|
116
|
+
print(payload["CORRELATION"]) # correlation matrix
|
|
117
|
+
print(payload["MAX_DRAWDOWN"])
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## ANALYTICS_SLIDING_WINDOW — Portfolio Analytics (Sliding Window)
|
|
121
|
+
|
|
122
|
+
Same as fixed window but with rolling calculations over time.
|
|
123
|
+
|
|
124
|
+
**Required:** Same as fixed window, plus:
|
|
125
|
+
- `WINDOW_SIZE` — number of periods (e.g., `20` for 20-day rolling window)
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
data = av_get(
|
|
129
|
+
"ANALYTICS_SLIDING_WINDOW",
|
|
130
|
+
SYMBOLS="AAPL,MSFT",
|
|
131
|
+
RANGE="1year",
|
|
132
|
+
INTERVAL="DAILY",
|
|
133
|
+
OHLC="close",
|
|
134
|
+
CALCULATIONS="MEAN,STDDEV",
|
|
135
|
+
WINDOW_SIZE=20
|
|
136
|
+
)
|
|
137
|
+
# Returns time series of rolling calculations
|
|
138
|
+
```
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Options Data APIs (Premium)
|
|
2
|
+
|
|
3
|
+
Both options endpoints require a premium Alpha Vantage subscription.
|
|
4
|
+
|
|
5
|
+
## REALTIME_OPTIONS — Real-time Options Chain
|
|
6
|
+
|
|
7
|
+
Returns real-time options contracts for a given symbol.
|
|
8
|
+
|
|
9
|
+
**Required:** `symbol`
|
|
10
|
+
|
|
11
|
+
**Optional:**
|
|
12
|
+
- `contract` — specific contract ID (e.g., `AAPL240119C00150000`) to get a single contract
|
|
13
|
+
- `datatype` — `json` or `csv`
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
data = av_get("REALTIME_OPTIONS", symbol="AAPL")
|
|
17
|
+
options = data["data"]
|
|
18
|
+
|
|
19
|
+
for contract in options[:5]:
|
|
20
|
+
print(
|
|
21
|
+
contract["contractID"], # e.g., "AAPL240119C00150000"
|
|
22
|
+
contract["strike"], # "150.00"
|
|
23
|
+
contract["expiration"], # "2024-01-19"
|
|
24
|
+
contract["type"], # "call" or "put"
|
|
25
|
+
contract["last"], # last price
|
|
26
|
+
contract["bid"],
|
|
27
|
+
contract["ask"],
|
|
28
|
+
contract["volume"],
|
|
29
|
+
contract["open_interest"],
|
|
30
|
+
contract["implied_volatility"],
|
|
31
|
+
contract["delta"],
|
|
32
|
+
contract["gamma"],
|
|
33
|
+
contract["theta"],
|
|
34
|
+
contract["vega"],
|
|
35
|
+
contract["rho"]
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
# Get a specific contract
|
|
39
|
+
data = av_get("REALTIME_OPTIONS", symbol="AAPL", contract="AAPL240119C00150000")
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## HISTORICAL_OPTIONS — Historical Options Chain
|
|
43
|
+
|
|
44
|
+
Returns historical end-of-day options data for a specific date.
|
|
45
|
+
|
|
46
|
+
**Required:** `symbol`
|
|
47
|
+
|
|
48
|
+
**Optional:**
|
|
49
|
+
- `date` — format `YYYY-MM-DD` (up to 2 years of history)
|
|
50
|
+
- `datatype` — `json` or `csv`
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
# Get options chain for a specific historical date
|
|
54
|
+
data = av_get("HISTORICAL_OPTIONS", symbol="AAPL", date="2023-12-15")
|
|
55
|
+
options = data["data"]
|
|
56
|
+
|
|
57
|
+
for contract in options[:5]:
|
|
58
|
+
print(
|
|
59
|
+
contract["contractID"],
|
|
60
|
+
contract["strike"],
|
|
61
|
+
contract["expiration"],
|
|
62
|
+
contract["type"], # "call" or "put"
|
|
63
|
+
contract["last"],
|
|
64
|
+
contract["mark"], # mark price
|
|
65
|
+
contract["bid"],
|
|
66
|
+
contract["ask"],
|
|
67
|
+
contract["volume"],
|
|
68
|
+
contract["open_interest"],
|
|
69
|
+
contract["date"], # the date of this snapshot
|
|
70
|
+
contract["implied_volatility"],
|
|
71
|
+
contract["delta"],
|
|
72
|
+
contract["gamma"],
|
|
73
|
+
contract["theta"],
|
|
74
|
+
contract["vega"],
|
|
75
|
+
contract["rho"]
|
|
76
|
+
)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Filter Options by Expiration/Type
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
import pandas as pd
|
|
83
|
+
|
|
84
|
+
data = av_get("HISTORICAL_OPTIONS", symbol="AAPL", date="2023-12-15")
|
|
85
|
+
df = pd.DataFrame(data["data"])
|
|
86
|
+
df["strike"] = pd.to_numeric(df["strike"])
|
|
87
|
+
df["expiration"] = pd.to_datetime(df["expiration"])
|
|
88
|
+
|
|
89
|
+
# Filter calls expiring in January 2024
|
|
90
|
+
calls_jan = df[(df["type"] == "call") & (df["expiration"].dt.month == 1) & (df["expiration"].dt.year == 2024)]
|
|
91
|
+
calls_jan = calls_jan.sort_values("strike")
|
|
92
|
+
print(calls_jan[["contractID", "strike", "bid", "ask", "implied_volatility", "delta"]].head(10))
|
|
93
|
+
```
|