finterm tool options_sentiment AAPL --as-of-date 2024-01-15import requests
url = "https://api.finterm.ai/api/v1/options/sentiment"
payload = {
"underlying_ticker": "<string>",
"date": "<string>",
"include_spread_analysis": True,
"expiration_filter": "<string>",
"max_contracts": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
underlying_ticker: '<string>',
date: '<string>',
include_spread_analysis: true,
expiration_filter: '<string>',
max_contracts: 123
})
};
fetch('https://api.finterm.ai/api/v1/options/sentiment', 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.finterm.ai/api/v1/options/sentiment",
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([
'underlying_ticker' => '<string>',
'date' => '<string>',
'include_spread_analysis' => true,
'expiration_filter' => '<string>',
'max_contracts' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.finterm.ai/api/v1/options/sentiment"
payload := strings.NewReader("{\n \"underlying_ticker\": \"<string>\",\n \"date\": \"<string>\",\n \"include_spread_analysis\": true,\n \"expiration_filter\": \"<string>\",\n \"max_contracts\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.finterm.ai/api/v1/options/sentiment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"underlying_ticker\": \"<string>\",\n \"date\": \"<string>\",\n \"include_spread_analysis\": true,\n \"expiration_filter\": \"<string>\",\n \"max_contracts\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.finterm.ai/api/v1/options/sentiment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"underlying_ticker\": \"<string>\",\n \"date\": \"<string>\",\n \"include_spread_analysis\": true,\n \"expiration_filter\": \"<string>\",\n \"max_contracts\": 123\n}"
response = http.request(request)
puts response.read_body{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"data": {
"ticker": "<string>",
"as_of_date": "<string>",
"sentiment": {
"put_call_volume_ratio": 123,
"total_call_volume": 123,
"total_put_volume": 123,
"avg_spread_percent": 123
},
"data_quality": {
"contracts_analyzed": 123,
"contracts_with_volume": 123,
"total_volume": 123
},
"contracts": {
"total_calls": 123,
"total_puts": 123,
"contracts_with_volume": 123,
"expirations": [
"<string>"
]
}
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}Put/call options sentiment for a symbol on a specific date, with a sample-quality verdict.
Measure options-market sentiment for one underlying symbol on a specific date. Returns the put/call volume ratio and its fixed convention label (below 0.7 bullish, 0.7–1.0 neutral, above 1.0 bearish), call and put volume, the average bid/ask spread, and a liquidity grade. The thresholds are descriptive conventions, not calibrated forecasts for a symbol or market regime. A data_quality block reports whether the sample is solid (“ok”), empty (“no_data”, e.g. a non-trading day), or too small to trust (“thin_sample”), so a reading is never mistaken for a confident one. The date is required and identifies which day to report.
finterm tool options_sentiment AAPL --as-of-date 2024-01-15import requests
url = "https://api.finterm.ai/api/v1/options/sentiment"
payload = {
"underlying_ticker": "<string>",
"date": "<string>",
"include_spread_analysis": True,
"expiration_filter": "<string>",
"max_contracts": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
underlying_ticker: '<string>',
date: '<string>',
include_spread_analysis: true,
expiration_filter: '<string>',
max_contracts: 123
})
};
fetch('https://api.finterm.ai/api/v1/options/sentiment', 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.finterm.ai/api/v1/options/sentiment",
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([
'underlying_ticker' => '<string>',
'date' => '<string>',
'include_spread_analysis' => true,
'expiration_filter' => '<string>',
'max_contracts' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.finterm.ai/api/v1/options/sentiment"
payload := strings.NewReader("{\n \"underlying_ticker\": \"<string>\",\n \"date\": \"<string>\",\n \"include_spread_analysis\": true,\n \"expiration_filter\": \"<string>\",\n \"max_contracts\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.finterm.ai/api/v1/options/sentiment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"underlying_ticker\": \"<string>\",\n \"date\": \"<string>\",\n \"include_spread_analysis\": true,\n \"expiration_filter\": \"<string>\",\n \"max_contracts\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.finterm.ai/api/v1/options/sentiment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"underlying_ticker\": \"<string>\",\n \"date\": \"<string>\",\n \"include_spread_analysis\": true,\n \"expiration_filter\": \"<string>\",\n \"max_contracts\": 123\n}"
response = http.request(request)
puts response.read_body{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"data": {
"ticker": "<string>",
"as_of_date": "<string>",
"sentiment": {
"put_call_volume_ratio": 123,
"total_call_volume": 123,
"total_put_volume": 123,
"avg_spread_percent": 123
},
"data_quality": {
"contracts_analyzed": 123,
"contracts_with_volume": 123,
"total_volume": 123
},
"contracts": {
"total_calls": 123,
"total_puts": 123,
"contracts_with_volume": 123,
"expirations": [
"<string>"
]
}
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}{
"finterm": {
"schema": "<string>",
"tool": "<string>",
"args": {},
"request_id": "<string>",
"cursor": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>",
"upgrade_url": "<string>"
}
}Authorizations
A live account API key from FINTERM_API_KEY.
Body
Underlying stock ticker symbol
Historical options sentiment date in YYYY-MM-DD format
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Include bid-ask spread analysis
Only contracts expiring on/after this date (YYYY-MM-DD)
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$Maximum contracts to analyze