Introduction
The OptionStrat AI API provides comprehensive endpoints for options trading analysis, strategy building, and AI-powered insights. All endpoints return JSON responses and follow RESTful conventions.Base URL
Response Format
All API responses follow a consistent JSON structure:Error Handling
The API uses standard HTTP status codes:200- Success400- Bad Request (invalid parameters)404- Resource Not Found500- Internal Server Error
API Categories
Option Chains
Retrieve options chain data, expirations, and live pricing
Calculations
Generate P&L heatmaps and strategy analysis
AI Insights
Greeks calculation and LLM-powered strategy analysis
Recommender
Get AI-recommended strategies based on market bias
Market Data
Market context, sentiment analysis, and insider data
Rate Limits
Rate limiting information will be added in future releases. For now, please be mindful of external API dependencies (Yahoo Finance).
Authentication
Authentication is not currently required for API endpoints. This may change in production deployments.
Quick Start
Here’s a simple example to get started:Data Sources
The API integrates with multiple data providers:- Yahoo Finance - Options chains, pricing, and market data
- YahooQuery - Insider trading information
- FinViz/VADER - Sentiment analysis
- Black-Scholes Model - Greeks calculations
Common Parameters
Stock ticker symbol (e.g., “AAPL”, “TSLA”)
Option expiration date in YYYY-MM-DD format
Days to expiration
Next Steps
Explore the specific endpoint categories to learn more about available functionality:- Option Chains - Real-time options data
- Calculations - Strategy P&L modeling
- AI Insights - Greeks and LLM analysis
- Recommender - Strategy recommendations
- Market Data - Comprehensive market context