optionwhales
by @psdsam-niuniuking
Query real-time option flow intelligence and generate AI-powered trade analysis reports. Use when users ask about option flow, unusual options activity, inst...
clawhub install optionwhalesπ About This Skill
name: option_whales description: Query real-time option flow intelligence and generate AI-powered trade analysis reports. Use when users ask about option flow, unusual options activity, institutional positioning, market sentiment from derivatives, or AI trade reports. homepage: https://www.optionwhales.io metadata: {"openclaw": {"emoji": "π", "requires": {"anyBins": ["python3", "python"], "env": ["OPTIONWHALES_API_KEY"]}, "primaryEnv": "OPTIONWHALES_API_KEY"}}
OptionWhales Intelligence Skill
Two capabilities in one skill:
1. Option Flow β query the OptionWhales Pro API for real-time institutional option flow analysis (intent momentum, abnormal trades, rankings). 2. AI Reports β generate and retrieve AI-powered trade analysis reports via a 22-node LLM pipeline (market analysis, flow, fundamentals, news, bull/bear debate, risk assessment, BUY/SELL/HOLD recommendation).
> Free tier available! Sign up at https://www.optionwhales.io to get a free > API key instantly β no credit card required.
When to Use
β USE this skill when:
When NOT to Use
β DON'T use this skill when:
Setup
Option Flow (required)
Requires an OptionWhales API key.
export OPTIONWHALES_API_KEY="ow_free_your_key_here" # or ow_pro_...
AI Reports (optional)
Requires an AI service Bearer token (contact system administrator).
export AI_API_TOKEN="your_bearer_token_here"
Part 1 β Option Flow API
Base URL: https://api.optionwhales.io/v1
All requests require header: X-API-Key: $OPTIONWHALES_API_KEY
Flow API Reference
Current Flow Rankings
curl -s -H "X-API-Key: $OPTIONWHALES_API_KEY" \
"https://api.optionwhales.io/v1/flow/current" | python3 -m json.tool
Response includes per-ticker: intent_primary (Directional/Gamma/LongVol/ShortVol/Mixed),
direction_bias (bullish/bearish/neutral), intent_confidence (0-1), momentum_fast,
momentum_slow, coherence_last, strength_last, key_strikes.
Ticker Detail (Clusters + Time Series)
curl -s -H "X-API-Key: $OPTIONWHALES_API_KEY" \
"https://api.optionwhales.io/v1/flow/current/AAPL" | python3 -m json.tool
Returns: ranking (summary), clusters (strategy clusters with dollar Greeks),
cluster_trades (individual trades), time_series (30-min momentum buckets).
Historical Sessions
# System health and session status
curl -s -H "X-API-Key: $OPTIONWHALES_API_KEY" \
"https://api.optionwhales.io/v1/flow/sessions" | python3 -m json.toolGet a specific session's rankings
curl -s -H "X-API-Key: $OPTIONWHALES_API_KEY" \
"https://api.optionwhales.io/v1/flow/2025-06-02" | python3 -m json.toolGet a specific ticker from a historical session
curl -s -H "X-API-Key: $OPTIONWHALES_API_KEY" \
"https://api.optionwhales.io/v1/flow/2025-06-02/AAPL" | python3 -m json.tool
Momentum Rankings
curl -s -H "X-API-Key: $OPTIONWHALES_API_KEY" \
"https://api.optionwhales.io/v1/momentum/rankings" | python3 -m json.tool
Momentum History
curl -s -H "X-API-Key: $OPTIONWHALES_API_KEY" \
"https://api.optionwhales.io/v1/momentum/AAPL/history" | python3 -m json.tool
Abnormal Trades
# Current session
curl -s -H "X-API-Key: $OPTIONWHALES_API_KEY" \
"https://api.optionwhales.io/v1/abnormal-trades/current" | python3 -m json.toolHistorical session
curl -s -H "X-API-Key: $OPTIONWHALES_API_KEY" \
"https://api.optionwhales.io/v1/abnormal-trades/2025-06-02" | python3 -m json.tool
Account Usage
curl -s -H "X-API-Key: $OPTIONWHALES_API_KEY" \
"https://api.optionwhales.io/v1/account/usage" | python3 -m json.tool
WebSocket β Real-Time Abnormal Trades (Pro Only)
python3 -c "
import asyncio, websockets, json
async def stream():
uri = 'wss://api.optionwhales.io/v1/ws/abnormal-trades?api_key=YOUR_PRO_KEY'
async with websockets.connect(uri) as ws:
await ws.send(json.dumps({'type': 'subscribe', 'tickers': ['AAPL', 'NVDA', 'TSLA']}))
async for msg in ws:
data = json.loads(msg)
if data['type'] == 'abnormal_trade':
print(json.dumps(data['data'], indent=2))
asyncio.run(stream())
"
Flow Helper Script
# Current flow rankings
python3 {baseDir}/scripts/optionflow.py flowFlow for specific ticker
python3 {baseDir}/scripts/optionflow.py flow --ticker AAPLHistorical session flow
python3 {baseDir}/scripts/optionflow.py flow --session 2025-06-02Momentum rankings
python3 {baseDir}/scripts/optionflow.py momentumTop 5 momentum tickers
python3 {baseDir}/scripts/optionflow.py momentum --top 5Current abnormal trades
python3 {baseDir}/scripts/optionflow.py abnormalHistorical abnormal trades
python3 {baseDir}/scripts/optionflow.py abnormal --session 2025-06-02
Interpreting Flow Results
Intent Types
| Intent | Meaning | |--------|---------| | Directional | Net delta-dominant flow β strong directional bet | | Gamma | Gamma-dominant β positioning for rapid price moves | | LongVol | Buying volatility (long vega, positive theta risk) | | ShortVol | Selling volatility (short vega, positive theta) | | Mixed | No dominant Greek β conflicting signals |Direction Bias
Confidence Score
0β1 scale combining flow coherence (how aligned the trades are) and strength (total dollar Greek magnitude). Above 0.7 is high conviction.Momentum
momentum_fast (Ξ±=0.35): responsive to recent flow changesmomentum_slow (Ξ±=0.15): trend-smoothedPart 2 β AI Report Service
Base URL: https://ai-service-production-b44b.up.railway.app
All requests require header: Authorization: Bearer $AI_API_TOKEN
Credit System
| Tier | Credits/Day | Can Generate? | |------|-------------|---------------| | FREE | 0 | No β hard-blocked | | TRIAL | 5 | Yes | | PRO | 5 | Yes | | ADMIN | Unlimited | Yes |
Additional constraints:
AI Report API Reference
Generate a Report
curl -s -X POST \
-H "Authorization: Bearer $AI_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_id":"user@example.com","user_tier":"PRO","ticker":"TSLA","session_date":"2026-03-25","session_type":"live","large_orders":[]}' \
"https://ai-service-production-b44b.up.railway.app/reports"
Returns: {"job_id": "abc-123", "status": "queued", "message": "..."}
Poll Job Status
curl -s -H "Authorization: Bearer $AI_API_TOKEN" \
"https://ai-service-production-b44b.up.railway.app/reports/{job_id}"
Fetch Report (JSON)
curl -s -H "Authorization: Bearer $AI_API_TOKEN" \
"https://ai-service-production-b44b.up.railway.app/reports/by-id?user_id=user@example.com&ticker=TSLA&trading_day=2026-03-25&report_id=rpt-456"
Fetch Report (Markdown)
curl -s -H "Authorization: Bearer $AI_API_TOKEN" \
"https://ai-service-production-b44b.up.railway.app/reports/{job_id}/artifact/md"
Report History
curl -s -H "Authorization: Bearer $AI_API_TOKEN" \
"https://ai-service-production-b44b.up.railway.app/reports/history?ticker=TSLA&trading_day=2026-03-25&user_id=user@example.com"
Per-Ticker Summary
curl -s -H "Authorization: Bearer $AI_API_TOKEN" \
"https://ai-service-production-b44b.up.railway.app/reports/history/summary?user_id=user@example.com&trading_day=2026-03-25"
Check Quota
curl -s -H "Authorization: Bearer $AI_API_TOKEN" \
"https://ai-service-production-b44b.up.railway.app/quotas?user_id=user@example.com&tier=PRO"
Check Eligibility
curl -s -X POST \
-H "Authorization: Bearer $AI_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_id":"user@example.com","user_tier":"PRO","ticker":"TSLA","session_date":"2026-03-25","session_type":"live","large_orders":[]}' \
"https://ai-service-production-b44b.up.railway.app/eligibility"
Health Check
curl -s -H "Authorization: Bearer $AI_API_TOKEN" \
"https://ai-service-production-b44b.up.railway.app/health"
AI Report Helper Script
# Generate a report
python3 {baseDir}/scripts/aireport.py generate --ticker TSLA --user-id user@example.com --user-tier PROCheck job status
python3 {baseDir}/scripts/aireport.py status --job-id abc-123Fetch report (JSON)
python3 {baseDir}/scripts/aireport.py report --user-id user@example.com --ticker TSLA --trading-day 2026-03-25 --report-id rpt-456Fetch report (Markdown)
python3 {baseDir}/scripts/aireport.py report --job-id abc-123 --format markdownBrowse existing reports
python3 {baseDir}/scripts/aireport.py summary --user-id user@example.com --trading-day 2026-03-25List reports for a ticker
python3 {baseDir}/scripts/aireport.py history --ticker TSLA --trading-day 2026-03-25 --user-id user@example.comCheck quota
python3 {baseDir}/scripts/aireport.py quota --user-id user@example.com --tier PROCheck eligibility
python3 {baseDir}/scripts/aireport.py eligibility --ticker TSLA --user-id user@example.com --user-tier PROService health
python3 {baseDir}/scripts/aireport.py health
Interpreting AI Report Results
Decision Actions
| Action | Meaning | |--------|---------| | BUY | Bullish β AI recommends long exposure on the underlying | | SELL | Bearish β AI recommends short exposure / protective puts | | HOLD | Neutral β no new directional exposure recommended |Confidence Score
0β100 scale reflecting the AI pipeline's conviction. Above 70% = high conviction; below 50% = conflicting signals.Report Sections
| Section | Content | |---------|---------| | Option Flow | Institutional flow analysis, intent momentum, flow coherence | | Abnormal Flow | Large/unusual trades flagged by the detection engine | | Market Structure | GEX levels, call/put walls, max pain, key strike zones | | Market | Macro indicators, OHLCV, technical levels | | Fundamentals | Company fundamentals, valuation metrics | | News | Recent news sentiment analysis | | Debate | Bull vs Bear researcher arguments with judge decision | | Risk | Three-analyst risk assessment (aggressive, conservative, neutral) |Example Queries β Commands
| User asks | Tool |
|-----------|------|
| "What's the flow today?" | python3 {baseDir}/scripts/optionflow.py flow |
| "Show TSLA option activity" | python3 {baseDir}/scripts/optionflow.py flow --ticker TSLA |
| "Top momentum tickers" | python3 {baseDir}/scripts/optionflow.py momentum |
| "Any unusual trades?" | python3 {baseDir}/scripts/optionflow.py abnormal |
| "Is AAPL bullish or bearish?" | python3 {baseDir}/scripts/optionflow.py flow --ticker AAPL β check direction_bias |
| "Generate AI report for TSLA" | python3 {baseDir}/scripts/aireport.py generate --ticker TSLA --user-id |
| "Show my report history" | python3 {baseDir}/scripts/aireport.py summary --user-id |
| "Check my report quota" | python3 {baseDir}/scripts/aireport.py quota --user-id |
| "Show my API usage" | python3 {baseDir}/scripts/optionflow.py usage |
Notes
β‘ When to Use
βοΈ Configuration
Option Flow (required)
Requires an OptionWhales API key.
export OPTIONWHALES_API_KEY="ow_free_your_key_here" # or ow_pro_...
AI Reports (optional)
Requires an AI service Bearer token (contact system administrator).
export AI_API_TOKEN="your_bearer_token_here"
Part 1 β Option Flow API
Base URL: https://api.optionwhales.io/v1
All requests require header: X-API-Key: $OPTIONWHALES_API_KEY