Options Flow Intelligence
Fetches real-time institutional options flow data from the OptionWhales API to detect whale trades, momentum shifts, and abnormal activity across US equities.
Setup
Set your API key:
export OPTIONWHALES_API_KEY="your_key_here"
Commands
# Market-wide flow (top 20 by momentum)
python scripts/optionflow.py flow
# Top momentum stocks
python scripts/optionflow.py momentum
# Abnormal trades (potential insider activity)
python scripts/optionflow.py abnormal
# Specific ticker deep dive
python scripts/optionflow.py ticker AAPL
python scripts/optionflow.py ticker TSLA
python scripts/optionflow.py ticker NVDA
Output Interpretation
- Signal scores range from 0-100, higher = stronger institutional conviction
- Direction shows whether smart money is buying calls (bullish) or puts (bearish)
- Premium shows total dollar value of options activity
- Momentum rankings show which stocks have the strongest options activity today
Integration with Trading Systems
The JSON output can be piped to other tools:
python scripts/optionflow.py flow | grep "BULLISH" | head -5
Use in automated alerting by setting up cron jobs or integrating with notification systems.
Data Freshness
Data refreshes every few minutes. For real-time streaming, consider the WebSocket API which is available on OptionWhales Pro plans. The current script focuses on REST API polling which is suitable for most use cases without requiring WebSocket infrastructure.