SEASONALITY API
Response and request schema references are described in API schemas.
GET /stats/seasonality/doc
Section titled “GET /stats/seasonality/doc”Seasonality Doc
Returns documentation for the fields in the Seasonality analysis output.
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }}GET /stats/seasonality/month
Section titled “GET /stats/seasonality/month”Month Seasonality
Parameters
Section titled “Parameters”| Name | In | Required | Type / constraints | Description |
|---|---|---|---|---|
symbol |
query | Yes | {"type": "string"} |
|
start_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Start date (YYYY-MM-DD) |
end_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
End date (YYYY-MM-DD) |
time_window |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} |
Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’) |
include_extended_hours |
query | No | {"type": "boolean", "default": false} |
Include pre/post-market data if True |
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}GET /stats/seasonality/summary
Section titled “GET /stats/seasonality/summary”Seasonality Summary
Parameters
Section titled “Parameters”| Name | In | Required | Type / constraints | Description |
|---|---|---|---|---|
symbol |
query | Yes | {"type": "string"} |
|
start_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Start date (YYYY-MM-DD) |
end_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
End date (YYYY-MM-DD) |
time_window |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} |
Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’) |
include_extended_hours |
query | No | {"type": "boolean", "default": false} |
Include pre/post-market data if True |
use_median |
query | No | {"type": "boolean", "default": true} |
If true, selects top/worst values using median_return_pct instead of avg_return_pct |
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}GET /stats/seasonality/top
Section titled “GET /stats/seasonality/top”Top Seasonality Patterns
Parameters
Section titled “Parameters”| Name | In | Required | Type / constraints | Description |
|---|---|---|---|---|
symbol |
query | Yes | {"type": "string"} |
|
start_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Start date (YYYY-MM-DD) |
end_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
End date (YYYY-MM-DD) |
time_window |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} |
Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’) |
type |
query | Yes | {"type": "string"} |
One of: weekday, week, month |
direction |
query | No | {"type": "string", "default": "top"} |
Sort direction: top or bottom |
sort_by |
query | No | {"type": "string", "default": "median_return_pct"} |
Sort by column: median_return_pct, avg_return_pct, green_days_pct or green_weeks_pct or green_months_pct |
limit |
query | No | {"type": "integer", "default": 5} |
Number of top entries to return |
include_extended_hours |
query | No | {"type": "boolean", "default": false} |
Include pre/post-market data if True |
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}GET /stats/seasonality/week
Section titled “GET /stats/seasonality/week”Week Seasonality
Parameters
Section titled “Parameters”| Name | In | Required | Type / constraints | Description |
|---|---|---|---|---|
symbol |
query | Yes | {"type": "string"} |
|
start_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Start date (YYYY-MM-DD) |
end_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
End date (YYYY-MM-DD) |
time_window |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} |
Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’) |
include_extended_hours |
query | No | {"type": "boolean", "default": false} |
Include pre/post-market data if True |
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}GET /stats/seasonality/weekday
Section titled “GET /stats/seasonality/weekday”Weekday Seasonality
Parameters
Section titled “Parameters”| Name | In | Required | Type / constraints | Description |
|---|---|---|---|---|
symbol |
query | Yes | {"type": "string"} |
|
start_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Start date (YYYY-MM-DD) |
end_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
End date (YYYY-MM-DD) |
time_window |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} |
Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’) |
include_extended_hours |
query | No | {"type": "boolean", "default": false} |
Include pre/post-market data if True |
use_median |
query | No | {"type": "boolean", "default": true} |
If true, selects top/worst values using median_return_pct instead of avg_return_pct |
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}