Preview contract selection
curl --request POST \
--url https://api.example.com/api/options/v1/contracts/preview \
--header 'Content-Type: application/json' \
--data '
{
"symbol": "<string>",
"config": {
"mode": "rule_based",
"direction": "auto",
"target_delta": 0.3,
"delta_tolerance": 0.1,
"dte_min": 7,
"dte_max": 45,
"option_type": "auto",
"min_open_interest": 10,
"max_spread_pct": 0.1,
"prefer_weekly": false
}
}
'import requests
url = "https://api.example.com/api/options/v1/contracts/preview"
payload = {
"symbol": "<string>",
"config": {
"mode": "rule_based",
"direction": "auto",
"target_delta": 0.3,
"delta_tolerance": 0.1,
"dte_min": 7,
"dte_max": 45,
"option_type": "auto",
"min_open_interest": 10,
"max_spread_pct": 0.1,
"prefer_weekly": False
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
symbol: '<string>',
config: {
mode: 'rule_based',
direction: 'auto',
target_delta: 0.3,
delta_tolerance: 0.1,
dte_min: 7,
dte_max: 45,
option_type: 'auto',
min_open_interest: 10,
max_spread_pct: 0.1,
prefer_weekly: false
}
})
};
fetch('https://api.example.com/api/options/v1/contracts/preview', 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/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'config' => [
'mode' => 'rule_based',
'direction' => 'auto',
'target_delta' => 0.3,
'delta_tolerance' => 0.1,
'dte_min' => 7,
'dte_max' => 45,
'option_type' => 'auto',
'min_open_interest' => 10,
'max_spread_pct' => 0.1,
'prefer_weekly' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/options/v1/contracts/preview"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"config\": {\n \"mode\": \"rule_based\",\n \"direction\": \"auto\",\n \"target_delta\": 0.3,\n \"delta_tolerance\": 0.1,\n \"dte_min\": 7,\n \"dte_max\": 45,\n \"option_type\": \"auto\",\n \"min_open_interest\": 10,\n \"max_spread_pct\": 0.1,\n \"prefer_weekly\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/options/v1/contracts/preview")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"config\": {\n \"mode\": \"rule_based\",\n \"direction\": \"auto\",\n \"target_delta\": 0.3,\n \"delta_tolerance\": 0.1,\n \"dte_min\": 7,\n \"dte_max\": 45,\n \"option_type\": \"auto\",\n \"min_open_interest\": 10,\n \"max_spread_pct\": 0.1,\n \"prefer_weekly\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/options/v1/contracts/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"config\": {\n \"mode\": \"rule_based\",\n \"direction\": \"auto\",\n \"target_delta\": 0.3,\n \"delta_tolerance\": 0.1,\n \"dte_min\": 7,\n \"dte_max\": 45,\n \"option_type\": \"auto\",\n \"min_open_interest\": 10,\n \"max_spread_pct\": 0.1,\n \"prefer_weekly\": false\n }\n}"
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>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Options
Preview contract selection
Preview what a contract selection config would select for a given symbol. Used by the Settings tab to show traders what their config selects.
POST
/
api
/
options
/
v1
/
contracts
/
preview
Preview contract selection
curl --request POST \
--url https://api.example.com/api/options/v1/contracts/preview \
--header 'Content-Type: application/json' \
--data '
{
"symbol": "<string>",
"config": {
"mode": "rule_based",
"direction": "auto",
"target_delta": 0.3,
"delta_tolerance": 0.1,
"dte_min": 7,
"dte_max": 45,
"option_type": "auto",
"min_open_interest": 10,
"max_spread_pct": 0.1,
"prefer_weekly": false
}
}
'import requests
url = "https://api.example.com/api/options/v1/contracts/preview"
payload = {
"symbol": "<string>",
"config": {
"mode": "rule_based",
"direction": "auto",
"target_delta": 0.3,
"delta_tolerance": 0.1,
"dte_min": 7,
"dte_max": 45,
"option_type": "auto",
"min_open_interest": 10,
"max_spread_pct": 0.1,
"prefer_weekly": False
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
symbol: '<string>',
config: {
mode: 'rule_based',
direction: 'auto',
target_delta: 0.3,
delta_tolerance: 0.1,
dte_min: 7,
dte_max: 45,
option_type: 'auto',
min_open_interest: 10,
max_spread_pct: 0.1,
prefer_weekly: false
}
})
};
fetch('https://api.example.com/api/options/v1/contracts/preview', 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/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'config' => [
'mode' => 'rule_based',
'direction' => 'auto',
'target_delta' => 0.3,
'delta_tolerance' => 0.1,
'dte_min' => 7,
'dte_max' => 45,
'option_type' => 'auto',
'min_open_interest' => 10,
'max_spread_pct' => 0.1,
'prefer_weekly' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/options/v1/contracts/preview"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"config\": {\n \"mode\": \"rule_based\",\n \"direction\": \"auto\",\n \"target_delta\": 0.3,\n \"delta_tolerance\": 0.1,\n \"dte_min\": 7,\n \"dte_max\": 45,\n \"option_type\": \"auto\",\n \"min_open_interest\": 10,\n \"max_spread_pct\": 0.1,\n \"prefer_weekly\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/options/v1/contracts/preview")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"config\": {\n \"mode\": \"rule_based\",\n \"direction\": \"auto\",\n \"target_delta\": 0.3,\n \"delta_tolerance\": 0.1,\n \"dte_min\": 7,\n \"dte_max\": 45,\n \"option_type\": \"auto\",\n \"min_open_interest\": 10,\n \"max_spread_pct\": 0.1,\n \"prefer_weekly\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/options/v1/contracts/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"config\": {\n \"mode\": \"rule_based\",\n \"direction\": \"auto\",\n \"target_delta\": 0.3,\n \"delta_tolerance\": 0.1,\n \"dte_min\": 7,\n \"dte_max\": 45,\n \"option_type\": \"auto\",\n \"min_open_interest\": 10,\n \"max_spread_pct\": 0.1,\n \"prefer_weekly\": false\n }\n}"
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>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json
Preview what a contract selection config would select for a symbol.
Response
Successful Response
Response containing contract recommendations.
Recommended options contract with full details.
Show child attributes
Show child attributes
Show child attributes
Show child attributes