API Documentation

Professional REST API for Credit Spread Analysis

Getting Started Authentication Endpoints Rate Limits Error Handling

Getting Started

The PowerOptions API provides programmatic access to real-time credit spread opportunities with multi-model probability analysis. All data is sourced from live market feeds with institutional-grade calculations.

Base URL

https://poweroptionsscan.com/api/v1

Features

  • Real-time market scanning for credit spread opportunities
  • Multi-model probability analysis (Black-Scholes, Monte Carlo, Historical Volatility, Delta-based)
  • Symbol-specific analysis with customizable parameters
  • Current price data for any stock symbol
  • Comprehensive risk/reward metrics and collateral calculations

Authentication

All endpoints (except /docs and /status) require API key authentication. You can authenticate using either a header or query parameter:

Header Authentication (Recommended)

X-API-Key: your_api_key_here

Query Parameter Authentication

?api_key=your_api_key_here
Security Note: API keys are hashed using SHA-256 and stored securely. Never share your API key or commit it to version control.

API Endpoints

1. Market Scanner

GET /api/v1/scan

Scan multiple symbols for top credit spread opportunities with real-time market data.

Parameters

Parameter Type Default Description
symbols string SPY,AAPL,TSLA,NVDA,META Comma-separated list of symbols
days integer 7 Days to expiration (1-90)
min_premium float 0.30 Minimum premium in dollars
limit integer 5 Maximum results to return (1-20)

Code Examples

cURL

curl -X GET "https://poweroptionsscan.com/api/v1/scan?symbols=SPY,TSLA&days=7&limit=5" \ -H "X-API-Key: your_api_key_here"

Python

import requests url = "https://poweroptionsscan.com/api/v1/scan" headers = {"X-API-Key": "your_api_key_here"} params = { "symbols": "SPY,TSLA", "days": 7, "limit": 5 } response = requests.get(url, headers=headers, params=params) data = response.json() if data["success"]: for opp in data["opportunities"]: print(f"{opp['symbol']}: {opp['strategy']}") print(f" Premium: ${opp['premium']}") print(f" Probability: {opp['probability']}%")

JavaScript (Node.js)

const axios = require('axios'); const url = 'https://poweroptionsscan.com/api/v1/scan'; const config = { headers: { 'X-API-Key': 'your_api_key_here' }, params: { symbols: 'SPY,TSLA', days: 7, limit: 5 } }; axios.get(url, config) .then(response => { const data = response.data; if (data.success) { data.opportunities.forEach(opp => { console.log(`${opp.symbol}: ${opp.strategy}`); console.log(` Premium: $${opp.premium}`); console.log(` Probability: ${opp.probability}%`); }); } }) .catch(error => console.error('Error:', error.message));

Response Example

{ "success": true, "count": 3, "opportunities": [ { "symbol": "META", "strategy": "Call Credit Spread", "short_strike": 727.5, "long_strike": 732.5, "premium": 1.08, "max_profit": 108.0, "max_loss": 392.0, "probability": 80.85, "probability_breakdown": { "black_scholes": 72.77, "delta_based": 76.81, "historical_volatility": 88.94, "monte_carlo": 84.90, "weighted_average": 80.85 }, "risk_reward_ratio": 0.2755, "return_on_collateral": 27.55, "expiration_date": "2025-10-17", "days_to_exp": 2, "iv": 0.2949, "delta": 0.1915, "collateral_required": 392.0 } ], "parameters": { "symbols": ["SPY", "TSLA"], "days": 7, "min_premium": 0.3, "limit": 5 }, "timestamp": "2025-10-14T17:07:24.886628" }

2. Symbol Analysis

GET /api/v1/analyze/{symbol}

Analyze a specific symbol for credit spread opportunities with customizable parameters.

Parameters

Parameter Type Default Description
symbol string required Stock symbol (path parameter)
days integer 7 Days to expiration (1-90)
delta_threshold float 0.20 Max delta for short leg (0.05-0.50)
spread_width integer 5 Spread width in dollars (1-50)
min_premium float 0.30 Minimum premium in dollars

Code Examples

cURL

curl -X GET "https://poweroptionsscan.com/api/v1/analyze/TSLA?days=7&limit=3" \ -H "X-API-Key: your_api_key_here"

Python

import requests url = "https://poweroptionsscan.com/api/v1/analyze/TSLA" headers = {"X-API-Key": "your_api_key_here"} params = {"days": 7, "limit": 3} response = requests.get(url, headers=headers, params=params) data = response.json() if data["success"]: print(f"Found {data['count']} opportunities for {data['symbol']}") for opp in data["opportunities"]: print(f" {opp['short_strike']}/{opp['long_strike']}") print(f" Premium: ${opp['premium']:.2f}")

JavaScript (fetch)

const url = 'https://poweroptionsscan.com/api/v1/analyze/TSLA?days=7&limit=3'; fetch(url, { headers: { 'X-API-Key': 'your_api_key_here' } }) .then(res => res.json()) .then(data => { if (data.success) { console.log(`Found ${data.count} opportunities for ${data.symbol}`); data.opportunities.forEach(opp => { console.log(` ${opp.short_strike}/${opp.long_strike}`); console.log(` Premium: $${opp.premium.toFixed(2)}`); }); } });

3. Current Price

GET /api/v1/price/{symbol}

Get current market price for a stock symbol.

Code Examples

cURL

curl -X GET "https://poweroptionsscan.com/api/v1/price/SPY" \ -H "X-API-Key: your_api_key_here"

Python

import requests url = "https://poweroptionsscan.com/api/v1/price/SPY" headers = {"X-API-Key": "your_api_key_here"} response = requests.get(url, headers=headers) data = response.json() if data["success"]: print(f"{data['symbol']}: ${data['price']}")

JavaScript

fetch('https://poweroptionsscan.com/api/v1/price/SPY', { headers: { 'X-API-Key': 'your_api_key_here' } }) .then(res => res.json()) .then(data => { if (data.success) { console.log(`${data.symbol}: $${data.price}`); } });

Response Example

{ "success": true, "symbol": "SPY", "price": 664.92, "timestamp": "2025-10-14T17:07:20.904092" }

4. API Documentation

GET /api/v1/docs

Get complete API documentation in JSON format. No authentication required.

Code Example

curl -X GET "https://poweroptionsscan.com/api/v1/docs"

5. API Status

GET /api/v1/status

Check API health and status. No authentication required.

Code Example

curl -X GET "https://poweroptionsscan.com/api/v1/status"

Response Example

{ "status": "operational", "version": "1.0.0", "timestamp": "2025-10-14T17:07:24.886628" }

Rate Limits & Pricing

Rate limits are enforced per API key per hour. Limits reset at the top of each hour.

Plan Rate Limit Price Features
Free 100 requests/hour $0/month Basic market scanning
Standard 1,000 requests/hour $29/month Advanced analysis, historical data
Professional 10,000 requests/hour $99/month Real-time data, priority support
Rate Limit Headers: Each API response includes headers showing your current rate limit status:
  • X-RateLimit-Limit: Your hourly rate limit
  • X-RateLimit-Remaining: Requests remaining this hour
  • X-RateLimit-Reset: Timestamp when limit resets

Error Handling

The API uses standard HTTP status codes to indicate success or failure.

HTTP Status Codes

Code Status Description
200 OK Request succeeded
401 Unauthorized Missing or invalid API key
403 Forbidden API key is inactive or revoked
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server-side error occurred

Error Response Format

{ "success": false, "error": "Invalid API key", "code": 401, "timestamp": "2025-10-14T17:07:24.886628" }

Rate Limit Error Example

{ "success": false, "error": "Rate limit exceeded", "code": 429, "limit": 100, "reset_at": "2025-10-14T18:00:00", "timestamp": "2025-10-14T17:07:24.886628" }

Best Practices

  • Always check the success field in responses
  • Implement exponential backoff for rate limit errors
  • Monitor rate limit headers to avoid hitting limits
  • Handle errors gracefully in your application
  • Use appropriate timeouts for API requests (recommended: 30 seconds)

OpenAPI Schema

Download the complete OpenAPI 3.0 specification for integration with API tools like Postman, Insomnia, or code generators:

Need Help?

For technical support, questions, or to upgrade your plan:

Return to Home