Get contract recommendation
curl --request GET \
--url https://api.example.com/api/options/v1/contracts/recommendimport requests
url = "https://api.example.com/api/options/v1/contracts/recommend"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/options/v1/contracts/recommend', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/options/v1/contracts/recommend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/options/v1/contracts/recommend"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/options/v1/contracts/recommend")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/options/v1/contracts/recommend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"symbol": "<string>",
"direction": "<string>",
"criteria": {},
"primary_recommendation": {
"symbol": "<string>",
"contract_symbol": "<string>",
"option_type": "<string>",
"strike": "<string>",
"expiration": "2023-12-25",
"dte": 123,
"delta": 123,
"gamma": 123,
"theta": 123,
"vega": 123,
"iv": 123,
"bid": "<string>",
"ask": "<string>",
"mid": "<string>",
"spread_pct": 123,
"volume": 123,
"liquidity_score": "excellent",
"score": 50,
"selection_rationale": "<string>",
"rho": 123,
"open_interest": 123,
"warnings": [
"<string>"
]
},
"alternatives": [
{
"symbol": "<string>",
"contract_symbol": "<string>",
"option_type": "<string>",
"strike": "<string>",
"expiration": "2023-12-25",
"dte": 123,
"delta": 123,
"gamma": 123,
"theta": 123,
"vega": 123,
"iv": 123,
"bid": "<string>",
"ask": "<string>",
"mid": "<string>",
"spread_pct": 123,
"volume": 123,
"liquidity_score": "excellent",
"score": 50,
"selection_rationale": "<string>",
"rho": 123,
"open_interest": 123,
"warnings": [
"<string>"
]
}
],
"no_suitable_contracts_reason": "<string>"
}Options
Get contract recommendation
Recommend optimal options contracts based on entry signal and criteria.
Algorithm
The contract recommender uses a multi-factor scoring algorithm:
- Delta proximity (30%): Closeness to target delta
- Spread quality (25%): Tighter bid-ask spreads score higher
- Liquidity (20%): Volume-based soft scoring (OI gates hard filtering at SQL layer, see #339)
- DTE fit (20%): Preference for middle of DTE range
Parameters
- symbol: Stock ticker (e.g., ‘AAPL’)
- direction: Trade direction (‘bullish’ or ‘bearish’)
- target_delta: Target absolute delta (default 0.30)
- dte_min: Minimum days to expiration (default 7)
- dte_max: Maximum days to expiration (default 21)
- max_spread_pct: Maximum bid-ask spread (default 0.10 = 10%)
Response
Returns primary recommendation with alternatives, including:
- Contract details (strike, expiration, Greeks)
- Pricing (bid, ask, spread)
- Liquidity metrics (volume, liquidity score)
- Selection rationale and warnings
Liquidity Scoring (volume + spread based; OI is used at the SQL hard gate, see #339)
- EXCELLENT: Spread < 3%, Volume > 500
- GOOD: Spread < 5%, Volume > 200
- ACCEPTABLE: Spread < 10%, Volume > 50
- POOR: Below acceptable thresholds
GET
/
api
/
options
/
v1
/
contracts
/
recommend
Get contract recommendation
curl --request GET \
--url https://api.example.com/api/options/v1/contracts/recommendimport requests
url = "https://api.example.com/api/options/v1/contracts/recommend"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/options/v1/contracts/recommend', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/options/v1/contracts/recommend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/options/v1/contracts/recommend"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/options/v1/contracts/recommend")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/options/v1/contracts/recommend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"symbol": "<string>",
"direction": "<string>",
"criteria": {},
"primary_recommendation": {
"symbol": "<string>",
"contract_symbol": "<string>",
"option_type": "<string>",
"strike": "<string>",
"expiration": "2023-12-25",
"dte": 123,
"delta": 123,
"gamma": 123,
"theta": 123,
"vega": 123,
"iv": 123,
"bid": "<string>",
"ask": "<string>",
"mid": "<string>",
"spread_pct": 123,
"volume": 123,
"liquidity_score": "excellent",
"score": 50,
"selection_rationale": "<string>",
"rho": 123,
"open_interest": 123,
"warnings": [
"<string>"
]
},
"alternatives": [
{
"symbol": "<string>",
"contract_symbol": "<string>",
"option_type": "<string>",
"strike": "<string>",
"expiration": "2023-12-25",
"dte": 123,
"delta": 123,
"gamma": 123,
"theta": 123,
"vega": 123,
"iv": 123,
"bid": "<string>",
"ask": "<string>",
"mid": "<string>",
"spread_pct": 123,
"volume": 123,
"liquidity_score": "excellent",
"score": 50,
"selection_rationale": "<string>",
"rho": 123,
"open_interest": 123,
"warnings": [
"<string>"
]
}
],
"no_suitable_contracts_reason": "<string>"
}Query Parameters
Stock ticker symbol (e.g., 'AAPL')
Required string length:
1 - 10Trade direction: 'bullish' or 'bearish'
Pattern:
^(bullish|bearish)$Target absolute delta (0.10 - 0.90)
Required range:
0.1 <= x <= 0.9Minimum days to expiration
Required range:
1 <= x <= 365Maximum days to expiration
Required range:
1 <= x <= 365Maximum bid-ask spread as decimal (0.10 = 10%)
Required range:
0.01 <= x <= 0.5Minimum daily volume
Required range:
x >= 0Response
Contract recommendations
Response containing contract recommendations.
Recommended options contract with full details.
Show child attributes
Show child attributes
Show child attributes
Show child attributes