Create stock watchlist
curl --request POST \
--url https://api.unusualwhales.com/api/watchlists/stocks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"color": "blue",
"name": "Semiconductors",
"tickers": [
"NVDA",
"AMD",
"TSM"
]
}
'import requests
url = "https://api.unusualwhales.com/api/watchlists/stocks"
payload = {
"color": "blue",
"name": "Semiconductors",
"tickers": ["NVDA", "AMD", "TSM"]
}
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({color: 'blue', name: 'Semiconductors', tickers: ['NVDA', 'AMD', 'TSM']})
};
fetch('https://api.unusualwhales.com/api/watchlists/stocks', 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/stocks",
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([
'color' => 'blue',
'name' => 'Semiconductors',
'tickers' => [
'NVDA',
'AMD',
'TSM'
]
]),
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/stocks"
payload := strings.NewReader("{\n \"color\": \"blue\",\n \"name\": \"Semiconductors\",\n \"tickers\": [\n \"NVDA\",\n \"AMD\",\n \"TSM\"\n ]\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/stocks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"color\": \"blue\",\n \"name\": \"Semiconductors\",\n \"tickers\": [\n \"NVDA\",\n \"AMD\",\n \"TSM\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unusualwhales.com/api/watchlists/stocks")
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 \"color\": \"blue\",\n \"name\": \"Semiconductors\",\n \"tickers\": [\n \"NVDA\",\n \"AMD\",\n \"TSM\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"color": "blue",
"id": "6b3c1e8a-58f4-4a7e-9c55-0f3c2f7f5a10",
"name": "Semiconductors",
"tickers": [
"NVDA",
"AMD",
"TSM"
]
}
}{
"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 stock watchlist
Creates a stock watchlist with the given name, tickers and color.
Unknown tickers and tickers without recent stock prices are left out of the watchlist. The request fails when none of the tickers remain. The number of watchlists and the number of tickers per watchlist are limited by the plan of the user.
POST
/
api
/
watchlists
/
stocks
Create stock watchlist
curl --request POST \
--url https://api.unusualwhales.com/api/watchlists/stocks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"color": "blue",
"name": "Semiconductors",
"tickers": [
"NVDA",
"AMD",
"TSM"
]
}
'import requests
url = "https://api.unusualwhales.com/api/watchlists/stocks"
payload = {
"color": "blue",
"name": "Semiconductors",
"tickers": ["NVDA", "AMD", "TSM"]
}
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({color: 'blue', name: 'Semiconductors', tickers: ['NVDA', 'AMD', 'TSM']})
};
fetch('https://api.unusualwhales.com/api/watchlists/stocks', 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/stocks",
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([
'color' => 'blue',
'name' => 'Semiconductors',
'tickers' => [
'NVDA',
'AMD',
'TSM'
]
]),
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/stocks"
payload := strings.NewReader("{\n \"color\": \"blue\",\n \"name\": \"Semiconductors\",\n \"tickers\": [\n \"NVDA\",\n \"AMD\",\n \"TSM\"\n ]\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/stocks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"color\": \"blue\",\n \"name\": \"Semiconductors\",\n \"tickers\": [\n \"NVDA\",\n \"AMD\",\n \"TSM\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unusualwhales.com/api/watchlists/stocks")
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 \"color\": \"blue\",\n \"name\": \"Semiconductors\",\n \"tickers\": [\n \"NVDA\",\n \"AMD\",\n \"TSM\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"color": "blue",
"id": "6b3c1e8a-58f4-4a7e-9c55-0f3c2f7f5a10",
"name": "Semiconductors",
"tickers": [
"NVDA",
"AMD",
"TSM"
]
}
}{
"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
Stock watchlist
The name, tickers and color of a stock watchlist. Unknown tickers and tickers without recent stock prices are left out of the watchlist.
Was this page helpful?
