Add tickers to stock watchlist
curl --request POST \
--url https://api.unusualwhales.com/api/watchlists/stocks/{id}/add-tickers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tickers": [
"NVDA",
"AMD"
]
}
'import requests
url = "https://api.unusualwhales.com/api/watchlists/stocks/{id}/add-tickers"
payload = { "tickers": ["NVDA", "AMD"] }
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({tickers: ['NVDA', 'AMD']})
};
fetch('https://api.unusualwhales.com/api/watchlists/stocks/{id}/add-tickers', 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/{id}/add-tickers",
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([
'tickers' => [
'NVDA',
'AMD'
]
]),
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/{id}/add-tickers"
payload := strings.NewReader("{\n \"tickers\": [\n \"NVDA\",\n \"AMD\"\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/{id}/add-tickers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tickers\": [\n \"NVDA\",\n \"AMD\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unusualwhales.com/api/watchlists/stocks/{id}/add-tickers")
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 \"tickers\": [\n \"NVDA\",\n \"AMD\"\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
Add tickers to stock watchlist
Adds tickers to a stock watchlist and keeps the tickers that are already on it. Tickers already on the watchlist are not added twice.
Unknown tickers and tickers without recent stock prices are left out. The request fails when none of the tickers remain. The number of tickers per watchlist is limited by the plan of the user. Default views provided by Unusual Whales cannot be changed and return 404.
POST
/
api
/
watchlists
/
stocks
/
{id}
/
add-tickers
Add tickers to stock watchlist
curl --request POST \
--url https://api.unusualwhales.com/api/watchlists/stocks/{id}/add-tickers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tickers": [
"NVDA",
"AMD"
]
}
'import requests
url = "https://api.unusualwhales.com/api/watchlists/stocks/{id}/add-tickers"
payload = { "tickers": ["NVDA", "AMD"] }
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({tickers: ['NVDA', 'AMD']})
};
fetch('https://api.unusualwhales.com/api/watchlists/stocks/{id}/add-tickers', 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/{id}/add-tickers",
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([
'tickers' => [
'NVDA',
'AMD'
]
]),
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/{id}/add-tickers"
payload := strings.NewReader("{\n \"tickers\": [\n \"NVDA\",\n \"AMD\"\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/{id}/add-tickers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tickers\": [\n \"NVDA\",\n \"AMD\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unusualwhales.com/api/watchlists/stocks/{id}/add-tickers")
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 \"tickers\": [\n \"NVDA\",\n \"AMD\"\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
Tickers
Was this page helpful?
