Create option watchlist
curl --request POST \
--url https://api.unusualwhales.com/api/watchlists/options \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chains": [
"AAPL261218C00250000"
],
"color": "green",
"name": "Earnings plays"
}
'import requests
url = "https://api.unusualwhales.com/api/watchlists/options"
payload = {
"chains": ["AAPL261218C00250000"],
"color": "green",
"name": "Earnings plays"
}
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({chains: ['AAPL261218C00250000'], color: 'green', name: 'Earnings plays'})
};
fetch('https://api.unusualwhales.com/api/watchlists/options', 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.unusualwhales.com/api/watchlists/options",
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([
'chains' => [
'AAPL261218C00250000'
],
'color' => 'green',
'name' => 'Earnings plays'
]),
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.unusualwhales.com/api/watchlists/options"
payload := strings.NewReader("{\n \"chains\": [\n \"AAPL261218C00250000\"\n ],\n \"color\": \"green\",\n \"name\": \"Earnings plays\"\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.unusualwhales.com/api/watchlists/options")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chains\": [\n \"AAPL261218C00250000\"\n ],\n \"color\": \"green\",\n \"name\": \"Earnings plays\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unusualwhales.com/api/watchlists/options")
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 \"chains\": [\n \"AAPL261218C00250000\"\n ],\n \"color\": \"green\",\n \"name\": \"Earnings plays\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"chains": [
"AAPL261218C00250000",
"SPY261218P00500000"
],
"color": "green",
"id": "0d6f7a52-3c41-4f0e-8a1b-7a2e9d4c6b11",
"name": "Earnings plays"
}
}{
"msg": "Invalid path input: MSFT12 (valid example: AAPL) - Invalid query input(s): date=2023-02-140 (valid example: date=2024-01-18)",
"path": "/api/darkpool/MSFT12",
"query": "date=2023-02-140",
"url": "localhost:4000/api/darkpool/MSFT12?date=2023-02-140"
}{
"code": "authentication_required",
"documentation_url": "https://api.unusualwhales.com/docs",
"expected_format": "uuid",
"message": "The API token provided is not in the expected format. Unusual Whales API tokens are UUIDs, such as 123e4567-e89b-12d3-a456-426614174000.",
"reason": "malformed_token",
"request_id": "GNI_YTC1CRnw2LACGBvE",
"retryable": false,
"support_email": "[email protected]",
"token_url": "https://unusualwhales.com/dashboard/api"
}{
"code": "payment_required",
"documentation_url": "https://api.unusualwhales.com/docs",
"message": "This API token is paused because the payment for your API subscription failed. Update your card at https://unusualwhales.com/settings. The same token works again once a payment succeeds.",
"reason": "payment_failed",
"request_id": "GNI_YTC1CRnw2LACGBvE",
"retryable": false,
"support_email": "[email protected]",
"token_url": "https://unusualwhales.com/dashboard/api"
}{
"code": "missing_access",
"documentation_url": "https://api.unusualwhales.com/docs",
"message": "The API token provided is valid but is not permitted to access this route.",
"reason": "route_not_permitted",
"request_id": "GNI_YTC1CRnw2LACGBvE",
"retryable": false,
"support_email": "[email protected]",
"token_url": "https://unusualwhales.com/dashboard/api"
}{
"msg": "Invalid path input: MSFT12 (valid example: AAPL) - Invalid query input(s): date=2023-02-140 (valid example: date=2024-01-18)",
"path": "/api/darkpool/MSFT12",
"query": "date=2023-02-140",
"url": "localhost:4000/api/darkpool/MSFT12?date=2023-02-140"
}Something went wrongwatchlists
Create option watchlist
Creates an option watchlist with the given name, option symbols and color.
Each option symbol must have option data for the last trading day and must not be expired. The number of watchlists and the number of option symbols per watchlist are limited by the plan of the user.
POST
/
api
/
watchlists
/
options
Create option watchlist
curl --request POST \
--url https://api.unusualwhales.com/api/watchlists/options \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chains": [
"AAPL261218C00250000"
],
"color": "green",
"name": "Earnings plays"
}
'import requests
url = "https://api.unusualwhales.com/api/watchlists/options"
payload = {
"chains": ["AAPL261218C00250000"],
"color": "green",
"name": "Earnings plays"
}
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({chains: ['AAPL261218C00250000'], color: 'green', name: 'Earnings plays'})
};
fetch('https://api.unusualwhales.com/api/watchlists/options', 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.unusualwhales.com/api/watchlists/options",
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([
'chains' => [
'AAPL261218C00250000'
],
'color' => 'green',
'name' => 'Earnings plays'
]),
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.unusualwhales.com/api/watchlists/options"
payload := strings.NewReader("{\n \"chains\": [\n \"AAPL261218C00250000\"\n ],\n \"color\": \"green\",\n \"name\": \"Earnings plays\"\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.unusualwhales.com/api/watchlists/options")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chains\": [\n \"AAPL261218C00250000\"\n ],\n \"color\": \"green\",\n \"name\": \"Earnings plays\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unusualwhales.com/api/watchlists/options")
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 \"chains\": [\n \"AAPL261218C00250000\"\n ],\n \"color\": \"green\",\n \"name\": \"Earnings plays\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"chains": [
"AAPL261218C00250000",
"SPY261218P00500000"
],
"color": "green",
"id": "0d6f7a52-3c41-4f0e-8a1b-7a2e9d4c6b11",
"name": "Earnings plays"
}
}{
"msg": "Invalid path input: MSFT12 (valid example: AAPL) - Invalid query input(s): date=2023-02-140 (valid example: date=2024-01-18)",
"path": "/api/darkpool/MSFT12",
"query": "date=2023-02-140",
"url": "localhost:4000/api/darkpool/MSFT12?date=2023-02-140"
}{
"code": "authentication_required",
"documentation_url": "https://api.unusualwhales.com/docs",
"expected_format": "uuid",
"message": "The API token provided is not in the expected format. Unusual Whales API tokens are UUIDs, such as 123e4567-e89b-12d3-a456-426614174000.",
"reason": "malformed_token",
"request_id": "GNI_YTC1CRnw2LACGBvE",
"retryable": false,
"support_email": "[email protected]",
"token_url": "https://unusualwhales.com/dashboard/api"
}{
"code": "payment_required",
"documentation_url": "https://api.unusualwhales.com/docs",
"message": "This API token is paused because the payment for your API subscription failed. Update your card at https://unusualwhales.com/settings. The same token works again once a payment succeeds.",
"reason": "payment_failed",
"request_id": "GNI_YTC1CRnw2LACGBvE",
"retryable": false,
"support_email": "[email protected]",
"token_url": "https://unusualwhales.com/dashboard/api"
}{
"code": "missing_access",
"documentation_url": "https://api.unusualwhales.com/docs",
"message": "The API token provided is valid but is not permitted to access this route.",
"reason": "route_not_permitted",
"request_id": "GNI_YTC1CRnw2LACGBvE",
"retryable": false,
"support_email": "[email protected]",
"token_url": "https://unusualwhales.com/dashboard/api"
}{
"msg": "Invalid path input: MSFT12 (valid example: AAPL) - Invalid query input(s): date=2023-02-140 (valid example: date=2024-01-18)",
"path": "/api/darkpool/MSFT12",
"query": "date=2023-02-140",
"url": "localhost:4000/api/darkpool/MSFT12?date=2023-02-140"
}Something went wrongAuthorizations
Body
application/json
Option watchlist
The name, option symbols and color of an option watchlist. Each new option symbol must have option data for the last trading day and must not be expired.
Was this page helpful?
