FlashAlpha Options Trading API (REST)
Technical reference for the FlashAlpha REST API, used to power algorithmic options trading, backtests, custom scanners, and automated execution workflows.
Overview: What You Can Build With the FlashAlpha API
The FlashAlpha options trading API provides programmatic access to our core infrastructure so you can build your own trading tools on top of the same engine that powers the FlashAlpha web platform.
Typical use cases include:
- Market-wide options scanning for credit spreads, iron condors, and other multi-leg strategies
- Position analytics based on expected value (EV), probability of profit, and volatility metrics
- Order execution through connected brokerage accounts (e.g., Interactive Brokers)
- Account information, risk, margin, and exposure monitoring
Base URL: https://api.flashalpha.com/v1
If you are evaluating algorithmic options trading platforms or looking to integrate options data into an existing system, the FlashAlpha API lets you start quickly with a free demo account and then scale to production when you are ready.
Authentication & Security
API Keys
Generate API keys in Settings → API once your FlashAlpha account is provisioned. Demo and sandbox environments use the same authentication scheme, so you can prototype safely before going live.
Include in all requests:
Authorization: Bearer YOUR_API_KEY
Rate Limits
- Standard: 100 requests/minute
- Pro: 500 requests/minute
- Enterprise: Custom limits
Core Endpoints
The endpoints below cover the most common integration scenarios: running scans, analyzing positions, placing orders, and monitoring accounts. For advanced usage and new releases, refer to the in-app API explorer in the FlashAlpha dashboard.
Scanning: Programmatic Access to the FlashAlpha Options Scanner
Run Scan
POST /scans
Request Body (example):
{
"strategy": "credit_put_spread",
"symbols": ["AAPL", "MSFT", "GOOGL"],
"filters": {
"min_ev_percent": 5,
"min_pop": 60,
"max_dte": 45
},
"sort": "ev_percent",
"limit": 50
}
Response (truncated example):
{
"scan_id": "scan_abc123",
"results": [...],
"total_results": 127,
"execution_time_ms": 234
}
Get Scan Status
GET /scans/{scan_id}
List Saved Scans
GET /scans/saved
Analysis: EV, Greeks, and Risk Metrics
Analyze Position
POST /analysis
Request Body:
{
"symbol": "AAPL",
"legs": [
{"strike": 180, "type": "put", "side": "sell"},
{"strike": 175, "type": "put", "side": "buy"}
],
"expiration": "2024-02-16"
}
Response (example metrics):
{
"ev": 42.50,
"ev_percent": 8.5,
"pop": 68.2,
"max_risk": 500,
"max_reward": 85,
"greeks": {
"delta": -0.12,
"theta": 2.34,
"vega": -1.56
}
}
Get Greeks
GET /analysis/greeks?symbol=AAPL&strike=185&type=put&expiration=2024-02-16
Orders: Executing Options Strategies via API
Place Order
POST /orders
Request Body:
{
"symbol": "AAPL",
"strategy": "credit_put_spread",
"legs": [
{"strike": 180, "type": "put", "side": "sell"},
{"strike": 175, "type": "put", "side": "buy"}
],
"quantity": 2,
"order_type": "limit",
"price": 0.85,
"time_in_force": "day"
}
Response:
{
"order_id": "ord_xyz789",
"status": "submitted",
"created_at": "2024-01-15T10:30:00Z"
}
Get Order Status
GET /orders/{order_id}
Cancel Order
DELETE /orders/{order_id}
List Orders
GET /orders?status=open
Bulk Orders: Portfolio-Level Execution
Place Bulk Order
POST /orders/bulk
Request Body:
{
"orders": [
{
"symbol": "AAPL",
"strategy": "credit_put_spread",
"quantity": 2
},
{
"symbol": "MSFT",
"strategy": "credit_put_spread",
"quantity": 3
}
],
"execution_mode": "simultaneous"
}
Account & Risk
Get Account Info
GET /account
Response:
{
"account_id": "U1234567",
"buying_power": 50000.00,
"net_liquidation": 125000.00,
"margin_used": 15000.00
}
Get Positions
GET /account/positions
Market & Volatility Data
Get Quote
GET /quotes/{symbol}
Get Option Chain
GET /options/{symbol}/chain?expiration=2024-02-16
Get Volatility Data
GET /volatility/{symbol}
Response:
{
"symbol": "AAPL",
"iv_rank": 45.2,
"iv_percentile": 52.1,
"hv_20": 22.3,
"hv_60": 26.1
}
Webhooks for Real-Time Automation
Receive real-time notifications for:
- Order fills
- Position changes
- Price alerts
Configure Webhook
POST /webhooks
{
"url": "https://your-server.com/webhook",
"events": ["order.filled", "alert.triggered"]
}
Webhook Payload
{
"event": "order.filled",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"order_id": "ord_xyz789",
"fill_price": 0.83,
"quantity": 2
}
}
Error Handling & Reliability
Error Response Format
{
"error": {
"code": "INVALID_REQUEST",
"message": "Missing required field: symbol",
"details": {...}
}
}
Common Error Codes
| Code | Description |
|---|---|
| INVALID_REQUEST | Malformed request body |
| UNAUTHORIZED | Invalid or expired API key |
| RATE_LIMITED | Too many requests |
| INSUFFICIENT_FUNDS | Not enough buying power |
| MARKET_CLOSED | Market is not open |
| SYMBOL_NOT_FOUND | Invalid symbol |
SDKs & Client Libraries
To shorten time-to-first-trade, FlashAlpha provides official SDKs so you can focus on your trading logic instead of HTTP plumbing:
- Python:
pip install flashalpha - JavaScript:
npm install @flashalpha/sdk
Python SDK Example
from flashalpha import Client
client = Client(api_key="YOUR_API_KEY")
# Run a scan
results = client.scan(
strategy="credit_put_spread",
symbols=["AAPL", "MSFT"],
filters={"min_ev_percent": 5}
)
# Place an order
order = client.place_order(
symbol="AAPL",
strategy="credit_put_spread",
legs=[...],
quantity=2
)
Rate Limiting & Scaling
When rate limited, you'll receive:
HTTP 429 Too Many Requests
Retry-After: 30
Wait the specified seconds before retrying.
Getting Access & Support
- API Status: status.flashalpha.com
- Documentation: docs.flashalpha.com/api
- Support: api-support@flashalpha.com