GAP API
Response and request schema references are described in API schemas.
GET /stats/gap
Section titled “GET /stats/gap”Get Gap Data
Parameters
Section titled “Parameters”| Name | In | Required | Type / constraints | Description |
|---|---|---|---|---|
symbol |
query | Yes | {"type": "string"} |
|
definition_version |
query | No | {"type": "integer", "maximum": 2, "minimum": 1, "default": 1} |
1: compatible intraday contract; 2: NYSE multi-session outcomes. V2 requires full regular sessions. |
horizons |
query | No | {"type": "string", "default": "0,1,2,3,5,10,20"} |
V2 forward trading-session offsets; D0=0, maximum 20; observation ends at end_date. |
percentiles |
query | No | {"type": "string", "default": "10,25,50,75,90"} |
V2 configurable distribution percentiles. |
atr_targets |
query | No | {"type": "string", "default": "1,2"} |
V2 target distances in prior 14-session ATR multiples. |
minimum_sample |
query | No | {"type": "integer", "maximum": 10000, "minimum": 1, "default": 20} |
|
benchmark_symbol |
query | No | {"type": "string", "default": "SPY"} |
V2 benchmark; empty string disables comparison. |
sector_symbol |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Optional explicitly selected sector benchmark. |
segment_by |
query | No | {"type": "string", "default": "direction"} |
V2 comma-separated dimensions: direction, weekday, gap_pct_bucket, gap_atr_bucket, gap_multiple_bucket, trend_5, trend_20, trend_50, volatility_regime, benchmark_direction, event_class. |
segment_filters |
query | No | {"type": "string", "default": "{}"} |
V2 JSON equality filters, e.g. {“direction”:“up”}. |
event_session_labels |
query | No | {"type": "string", "default": "{}"} |
Verified session labels as JSON: ISO session date -> earnings, event, or unclassified. Unverified events remain unclassified. |
corporate_action_dates |
query | No | {"type": "string", "default": ""} |
Verified ex-dates on source-price basis. Excludes events on those dates and censors paths crossing them; no automatic adjustment is inferred. |
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) |
fill_cutoff |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Time cutoff (UTC) for fill check, e.g., ‘16:30’ |
start_time |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Daily UTC start time (HH:MM). If omitted, session-aware defaults are used. |
end_time |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Daily UTC end time (HH:MM). If omitted, session-aware defaults are used. |
time_window |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} |
Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’) |
include_excursion |
query | No | {"type": "boolean", "default": false} |
Include the available movement profile when supported. |
Responses
Section titled “Responses”{ "200": { "description": "Legacy raw gaps or opt-in v2 outcomes", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/GapOutcomeResponse" }, { "$ref": "#/components/schemas/LegacyGapResponse" } ], "title": "Response 200 Get Gap Data Stats Gap Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}GET /stats/gap/doc
Section titled “GET /stats/gap/doc”Get Gap Doc
Endpoint to return documentation of the gap analysis raw output fields.
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }}GET /stats/gap/summary
Section titled “GET /stats/gap/summary”Get Gap Summary
Parameters
Section titled “Parameters”| Name | In | Required | Type / constraints | Description |
|---|---|---|---|---|
symbol |
query | Yes | {"type": "string"} |
|
definition_version |
query | No | {"type": "integer", "maximum": 2, "minimum": 1, "default": 1} |
1: compatible intraday contract; 2: NYSE multi-session outcomes. V2 requires full regular sessions. |
horizons |
query | No | {"type": "string", "default": "0,1,2,3,5,10,20"} |
V2 forward trading-session offsets; D0=0, maximum 20; observation ends at end_date. |
percentiles |
query | No | {"type": "string", "default": "10,25,50,75,90"} |
V2 configurable distribution percentiles. |
atr_targets |
query | No | {"type": "string", "default": "1,2"} |
V2 target distances in prior 14-session ATR multiples. |
minimum_sample |
query | No | {"type": "integer", "maximum": 10000, "minimum": 1, "default": 20} |
|
benchmark_symbol |
query | No | {"type": "string", "default": "SPY"} |
V2 benchmark; empty string disables comparison. |
sector_symbol |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Optional explicitly selected sector benchmark. |
segment_by |
query | No | {"type": "string", "default": "direction"} |
V2 comma-separated dimensions: direction, weekday, gap_pct_bucket, gap_atr_bucket, gap_multiple_bucket, trend_5, trend_20, trend_50, volatility_regime, benchmark_direction, event_class. |
segment_filters |
query | No | {"type": "string", "default": "{}"} |
V2 JSON equality filters, e.g. {“direction”:“up”}. |
event_session_labels |
query | No | {"type": "string", "default": "{}"} |
Verified session labels as JSON: ISO session date -> earnings, event, or unclassified. Unverified events remain unclassified. |
corporate_action_dates |
query | No | {"type": "string", "default": ""} |
Verified ex-dates on source-price basis. Excludes events on those dates and censors paths crossing them; no automatic adjustment is inferred. |
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) |
fill_cutoff |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Time cutoff (UTC) for fill check, e.g., ‘16:30’ |
start_time |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Daily UTC start time (HH:MM). If omitted, session-aware defaults are used. |
end_time |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Daily UTC end time (HH:MM). If omitted, session-aware defaults are used. |
time_window |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} |
Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’) |
include_excursion |
query | No | {"type": "boolean", "default": false} |
Include the available movement profile when supported. |
Responses
Section titled “Responses”{ "200": { "description": "Legacy summary or opt-in v2 directional outcomes", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/GapOutcomeResponse" }, { "$ref": "#/components/schemas/LegacyGapResponse" } ], "title": "Response 200 Get Gap Summary Stats Gap Summary Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}GET /stats/gap/top
Section titled “GET /stats/gap/top”Get Top Gaps
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) |
top_n |
query | No | {"type": "integer", "default": 10} |
|
fill_cutoff |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Time cutoff (UTC) for fill check, e.g., ‘16:30’ |
start_time |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Daily UTC start time (HH:MM). If omitted, session-aware defaults are used. |
end_time |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Daily UTC end time (HH:MM). If omitted, session-aware defaults are used. |
time_window |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} |
Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’) |
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/gap/top-fills
Section titled “GET /stats/gap/top-fills”Get Fastest Gap Fills
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) |
top_n |
query | No | {"type": "integer", "default": 10} |
|
fill_cutoff |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Time cutoff (UTC) for fill check, e.g., ‘16:30’ |
start_time |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Daily UTC start time (HH:MM). If omitted, session-aware defaults are used. |
end_time |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Daily UTC end time (HH:MM). If omitted, session-aware defaults are used. |
time_window |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} |
Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’) |
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}