技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
unusual-whales-api【数据与研究】Query the Unusual Whales API for unusual options flow, dark pool prints, market tide sentiment, gamma exposure, congressional trading, and stock greeks. Use when someone asks about "unusual options activity", "whale trades", "dark pool prints", "market sentiment", "gamma exposure", "GEX", "congressional trading", "insider trading", or needs real-time…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Query the Unusual Whales API for institutional-grade market data — unusual options flow, dark pool prints, market tide sentiment, gamma exposure, congressional trading, and stock greeks.
Use this skill when the user asks for financial data related to:
UNUSUAL_WHALES_API_TOKEN in your environmentBase URL: Always use https://api.unusualwhales.com
Authentication: All requests MUST include both headers:
Authorization: Bearer $UNUSUAL_WHALES_API_TOKEN
UW-CLIENT-API-ID: 100001
Method: All endpoints are GET requests. Never use POST, PUT, or DELETE.
Strict Whitelist: You may ONLY use endpoints listed in the "Valid Endpoint Reference" section below. If a URL is not on that list, it does not exist.
These endpoints are fake but commonly hallucinated by AI models:
/api/options/flow — Use /api/option-trades/flow-alerts/api/flow or /api/flow/live/api/stock/{ticker}/flow — Use /api/stock/{ticker}/flow-recent/api/stock/{ticker}/options — Use /api/stock/{ticker}/option-contracts/api/unusual-activity/api/v1/ or /api/v2/apiKey= or api_key= — Use Authorization header onlyTranslate user intent to the correct endpoint:
/api/option-trades/flow-alerts/api/screener/option-contracts/api/market/market-tide/api/darkpool/recent or /api/darkpool/{ticker}/api/stock/{ticker}/greeks/api/stock/{ticker}/spot-exposures/strike/api/option-trades
limit, ticker_symbol, min_premium, max_premium, min_dte, max_dte, is_otm, opening, size_greater_oi, volume_greater_oi, newer_than/older_than (Unix seconds or ms), list params as tags[]=ask_side/api/option-trades/flow-alerts
limit, is_call, is_put, is_otm, min_premium, ticker_symbol, size_greater_oi/api/screener/option-contracts
limit, min_premium, type, is_otm, issue_types[], min_volume_oi_ratio/api/stock/{ticker}/flow-recent/api/darkpool/{ticker}/api/darkpool/recent/api/market/market-tide/api/stock/{ticker}/net-prem-ticks/api/stock/{ticker}/option-contracts/api/stock/{ticker}/greeks/api/stock/{ticker}/greek-exposure/strike/api/stock/{ticker}/spot-exposures/strike/api/stock/{ticker}/interpolated-iv/api/stock/{ticker}/options-volume/api/stock/{ticker}/financials (also /income-statements, /balance-sheets, /cash-flows, /earnings with report_type)/api/stock/{ticker}/technical-indicator/{function} (params interval, time_period, series_type)/api/insider/transactions/api/congress/recent-trades/api/news/headlinesUser prompt: "Show me the latest unusual option trades for TSLA."
# unusual_whales_flow.py — Fetch unusual options flow alerts for a ticker
import os
import httpx
url = "https://api.unusualwhales.com/api/option-trades/flow-alerts"
headers = {
"Authorization": f"Bearer {os.environ['UNUSUAL_WHALES_API_TOKEN']}",
"UW-CLIENT-API-ID": "100001",
}
params = {
"ticker_symbol": "TSLA",
"min_premium": 50_000, # Minimum $50K premium
"size_greater_oi": True, # Opening trades where size > open_interest
"limit": 10,
"is_otm": True # Out-of-the-money only
}
response = httpx.get(url, headers=headers, params=params)
trades = response.json().get("data", [])
for trade in trades:
print(f"{trade['ticker']} | {trade['type']} | ${trade['total_premium']:,.0f}")
User prompt: "Show me unusually bullish option activity for today."
# unusual_whales_screener.py — Screen for bullish options activity
import os
import httpx
url = "https://api.unusualwhales.com/api/screener/option-contracts"
headers = {
"Authorization": f"Bearer {os.environ['UNUSUAL_WHALES_API_TOKEN']}",
"UW-CLIENT-API-ID": "100001",
}
params = {
"limit": 150,
"is_otm": True,
"issue_types[]": ["Common Stock", "ADR"],
"max_dte": 183, # Max 6 months to expiry
"max_multileg_volume_ratio": 0.1, # Filter out spread trades
"min_ask_perc": 0.7, # Aggressive buyers (paying near ask)
"min_volume": 500,
"min_premium": 250_000, # $250K+ premium
"type": "Calls", # Bullish = calls
"volume_greater_oi": True, # Volume exceeds open interest
}
response = httpx.get(url, headers=headers, params=params)
data = response.json().get("data", [])
for contract in data:
print(f"{contract['ticker_symbol']} {contract['option_symbol']} | Vol: {contract.get('ask_side_volume')}")
User prompt: "Any big dark pool prints on NVDA?"
# unusual_whales_darkpool.py — Fetch dark pool trades for a ticker
import os
import httpx
url = "https://api.unusualwhales.com/api/darkpool/NVDA"
headers = {
"Authorization": f"Bearer {os.environ['UNUSUAL_WHALES_API_TOKEN']}",
"UW-CLIENT-API-ID": "100001",
}
response = httpx.get(url, headers=headers)
prints = response.json().get("data", [])
for p in prints:
notional = float(p['price']) * int(p['size'])
print(f"${notional:,.0f} | {p['size']} shares @ ${p['price']} | {p['executed_at']}")
User prompt: "What is the overall market sentiment right now?"
# unusual_whales_tide.py — Fetch market tide sentiment data
import os
import httpx
url = "https://api.unusualwhales.com/api/market/market-tide"
headers = {
"Authorization": f"Bearer {os.environ['UNUSUAL_WHALES_API_TOKEN']}",
"UW-CLIENT-API-ID": "100001",
}
params = {"interval_5m": False} # Full day view
response = httpx.get(url, headers=headers, params=params)
data = response.json().get("data", [])
latest = data[-1] if data else {}
net_call = float(latest.get('net_call_premium', 0))
net_put = float(latest.get('net_put_premium', 0))
sentiment = "BULLISH" if net_call > net_put else "BEARISH"
print(f"Market Tide: {sentiment} | Calls: ${net_call:,.0f} | Puts: ${net_put:,.0f}")
User prompt: "Show me the gamma exposure for RIVN by strike."
# unusual_whales_gex.py — Fetch spot gamma exposure by strike
import os
import httpx
url = "https://api.unusualwhales.com/api/stock/RIVN/spot-exposures/strike"
headers = {
"Authorization": f"Bearer {os.environ['UNUSUAL_WHALES_API_TOKEN']}",
"UW-CLIENT-API-ID": "100001",
}
response = httpx.get(url, headers=headers)
data = response.json().get("data", [])
for level in sorted(data, key=lambda x: abs(float(x.get('call_gamma_oi', 0))), reverse=True)[:10]:
print(f"Strike ${level['strike']} | Call GEX: {level.get('call_gamma_oi')} | Put GEX: {level.get('put_gamma_oi')}")
User prompt: "Show me recent congressional stock trades."
# unusual_whales_congress.py — Fetch politician trading disclosures
import os
import httpx
url = "https://api.unusualwhales.com/api/congress/recent-trades"
headers = {
"Authorization": f"Bearer {os.environ['UNUSUAL_WHALES_API_TOKEN']}",
"UW-CLIENT-API-ID": "100001",
}
response = httpx.get(url, headers=headers)
trades = response.json().get("data", [])
for trade in trades[:20]:
print(f"{trade.get('politician')} | {trade.get('ticker')} | {trade.get('type')} | {trade.get('amount')}")
size_greater_oi=True to filter for opening positions (new money entering)is_otm=True to filter for out-of-the-money options (higher leverage bets)min_premium is in dollars — use 50000 for $50K, 500000 for $500Kinterval_5m=False gives full-day aggregated viewUW-CLIENT-API-ID is a common cause of rejected requestsUNUSUAL_WHALES_API_TOKEN