curl --request GET \
--url https://api.unusualwhales.com/api/seasonality/market \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.unusualwhales.com/api/seasonality/market"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.unusualwhales.com/api/seasonality/market', 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/seasonality/market",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.unusualwhales.com/api/seasonality/market"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.unusualwhales.com/api/seasonality/market")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unusualwhales.com/api/seasonality/market")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"avg_change": "-0.0068",
"max_change": "0.0642",
"median_change": "-0.0041",
"min_change": "-0.0913",
"month": 6,
"positive_closes": 7,
"positive_months_perc": "0.4375",
"ticker": "SPY",
"years": 16
},
{
"avg_change": "0.0038",
"max_change": "0.0666",
"median_change": "0.0115",
"min_change": "-0.0838",
"month": 5,
"positive_closes": 13,
"positive_months_perc": "0.8125",
"ticker": "SPY",
"years": 16
},
{
"avg_change": "0.0092",
"max_change": "0.0791",
"median_change": "0.0367",
"min_change": "-0.1614",
"month": 3,
"positive_closes": 5,
"positive_months_perc": "0.7142",
"ticker": "XLRE",
"years": 7
},
{
"avg_change": "0.0044",
"max_change": "0.0697",
"median_change": "-0.0032",
"min_change": "-0.0651",
"month": 2,
"positive_closes": 8,
"positive_months_perc": "0.4705",
"ticker": "QQQ",
"years": 17
},
{
"avg_change": "0.0201",
"max_change": "0.1459",
"median_change": "-0.0034",
"min_change": "-0.0401",
"month": 4,
"positive_closes": 3,
"positive_months_perc": "0.4285",
"ticker": "XLRE",
"years": 7
}
]
}{
"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": "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"
}"Something went wrong"Market Seasonality
Returns the average return by month for the tickers SPY, QQQ, IWM, XLE, XLC, XLK, XLV, XLP, XLY, XLRE, XLF, XLI, XLB .
curl --request GET \
--url https://api.unusualwhales.com/api/seasonality/market \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.unusualwhales.com/api/seasonality/market"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.unusualwhales.com/api/seasonality/market', 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/seasonality/market",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.unusualwhales.com/api/seasonality/market"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.unusualwhales.com/api/seasonality/market")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unusualwhales.com/api/seasonality/market")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"avg_change": "-0.0068",
"max_change": "0.0642",
"median_change": "-0.0041",
"min_change": "-0.0913",
"month": 6,
"positive_closes": 7,
"positive_months_perc": "0.4375",
"ticker": "SPY",
"years": 16
},
{
"avg_change": "0.0038",
"max_change": "0.0666",
"median_change": "0.0115",
"min_change": "-0.0838",
"month": 5,
"positive_closes": 13,
"positive_months_perc": "0.8125",
"ticker": "SPY",
"years": 16
},
{
"avg_change": "0.0092",
"max_change": "0.0791",
"median_change": "0.0367",
"min_change": "-0.1614",
"month": 3,
"positive_closes": 5,
"positive_months_perc": "0.7142",
"ticker": "XLRE",
"years": 7
},
{
"avg_change": "0.0044",
"max_change": "0.0697",
"median_change": "-0.0032",
"min_change": "-0.0651",
"month": 2,
"positive_closes": 8,
"positive_months_perc": "0.4705",
"ticker": "QQQ",
"years": 17
},
{
"avg_change": "0.0201",
"max_change": "0.1459",
"median_change": "-0.0034",
"min_change": "-0.0401",
"month": 4,
"positive_closes": 3,
"positive_months_perc": "0.4285",
"ticker": "XLRE",
"years": 7
}
]
}{
"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": "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"
}"Something went wrong"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
The price change for the ticker over the given count of years.
The average relative price change per day for the month.
0.09494354167379757
The maximum relative price change per day for the month.
0.14970489711277724
The median relative price change per day for the month.
0.09494354167379757
The minimum relative price change per day for the month.
0.0401821862348179
The number indicating the month the data applies for. e.g. 1 -> January, 2 -> February, ...
5
The number of years, the month had a positive close.
2
The relative amount of times, the month had a positive close. Multiply with 100 to get the amount in percent.
0.6667
The stock ticker.
"AAPL"
The number of years used to calculate the data.
3
Was this page helpful?
