Movement analysis API
Response and request schema references are described in API schemas.
GET /stats/{family}/excursion-analysis
Section titled “GET /stats/{family}/excursion-analysis”OHLC target/stop first-touch analysis; ambiguous ordering is explicit
Parameters
Section titled “Parameters”| Name | In | Required | Type / constraints | Description |
|---|---|---|---|---|
family |
path | Yes | {"enum": ["orb", "gap", "fvg", "bos", "pdhlb"], "type": "string"} |
|
symbol |
query | Yes | {"type": "string", "minLength": 1, "maxLength": 32, "pattern": "^[A-Za-z0-9][A-Za-z0-9./-]*$"} |
|
start_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
end_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
time_window |
query | No | {"type": "string", "default": "1M"} |
|
target_pct |
query | Yes | {"type": "number", "maximum": 50, "exclusiveMinimum": 0} |
|
stop_pct |
query | Yes | {"type": "number", "maximum": 50, "exclusiveMinimum": 0} |
|
entry_model |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
horizon |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
include_events |
query | No | {"type": "boolean", "default": false} |
|
segment_by |
query | No | {"anyOf": [{"enum": ["trend_regime", "trend_confidence", "orb_size", "breakout_time"], "type": "string"}, {"type": "null"}]} |
|
direction |
query | No | {"anyOf": [{"enum": ["long", "short"], "type": "string"}, {"type": "null"}]} |
|
confidence_edges |
query | No | {"anyOf": [{"type": "array", "items": {"type": "number"}}, {"type": "null"}]} |
Increasing confidence bucket boundaries; repeat the parameter, e.g. 50,70,85 |
trend_regime |
query | No | {"anyOf": [{"enum": ["bullish", "sideways", "bearish"], "type": "string"}, {"type": "null"}]} |
|
trend_confidence_min |
query | No | {"anyOf": [{"type": "number", "maximum": 100, "minimum": 0}, {"type": "null"}]} |
|
orb_size |
query | No | {"anyOf": [{"enum": ["small", "normal", "large"], "type": "string"}, {"type": "null"}]} |
|
breakout_time_before |
query | No | {"anyOf": [{"type": "string", "pattern": "^(09:[3-5][0-9]|1[0-5]:[0-5][0-9]|16:00)$"}, {"type": "null"}]} |
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExcursionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}GET /stats/{family}/excursions
Section titled “GET /stats/{family}/excursions”Versioned materialized per-event excursion profiles
Parameters
Section titled “Parameters”| Name | In | Required | Type / constraints | Description |
|---|---|---|---|---|
family |
path | Yes | {"enum": ["orb", "gap", "fvg", "bos", "pdhlb"], "type": "string"} |
|
symbol |
query | Yes | {"type": "string", "minLength": 1, "maxLength": 32, "pattern": "^[A-Za-z0-9][A-Za-z0-9./-]*$"} |
|
start_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
end_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
time_window |
query | No | {"type": "string", "default": "1M"} |
|
entry_model |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
horizon |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExcursionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}GET /stats/{family}/excursions/summary
Section titled “GET /stats/{family}/excursions/summary”Directional distributions with explicit coverage
Parameters
Section titled “Parameters”| Name | In | Required | Type / constraints | Description |
|---|---|---|---|---|
family |
path | Yes | {"enum": ["orb", "gap", "fvg", "bos", "pdhlb"], "type": "string"} |
|
symbol |
query | Yes | {"type": "string", "minLength": 1, "maxLength": 32, "pattern": "^[A-Za-z0-9][A-Za-z0-9./-]*$"} |
|
start_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
end_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
time_window |
query | No | {"type": "string", "default": "1M"} |
|
entry_model |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
horizon |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExcursionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}POST /stats/{family}/excursion-analysis
Section titled “POST /stats/{family}/excursion-analysis”Request missing results and return the current analysis
Parameters
Section titled “Parameters”| Name | In | Required | Type / constraints | Description |
|---|---|---|---|---|
family |
path | Yes | {"enum": ["orb", "gap", "fvg", "bos", "pdhlb"], "type": "string"} |
|
symbol |
query | Yes | {"type": "string", "minLength": 1, "maxLength": 32, "pattern": "^[A-Za-z0-9][A-Za-z0-9./-]*$"} |
|
start_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
end_date |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
time_window |
query | No | {"type": "string", "default": "1M"} |
|
target_pct |
query | Yes | {"type": "number", "maximum": 50, "exclusiveMinimum": 0} |
|
stop_pct |
query | Yes | {"type": "number", "maximum": 50, "exclusiveMinimum": 0} |
|
entry_model |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
horizon |
query | No | {"anyOf": [{"type": "string"}, {"type": "null"}]} |
|
include_events |
query | No | {"type": "boolean", "default": false} |
|
segment_by |
query | No | {"anyOf": [{"enum": ["trend_regime", "trend_confidence", "orb_size", "breakout_time"], "type": "string"}, {"type": "null"}]} |
|
direction |
query | No | {"anyOf": [{"enum": ["long", "short"], "type": "string"}, {"type": "null"}]} |
|
confidence_edges |
query | No | {"anyOf": [{"type": "array", "items": {"type": "number"}}, {"type": "null"}]} |
Increasing confidence bucket boundaries; repeat the parameter, e.g. 50,70,85 |
trend_regime |
query | No | {"anyOf": [{"enum": ["bullish", "sideways", "bearish"], "type": "string"}, {"type": "null"}]} |
|
trend_confidence_min |
query | No | {"anyOf": [{"type": "number", "maximum": 100, "minimum": 0}, {"type": "null"}]} |
|
orb_size |
query | No | {"anyOf": [{"enum": ["small", "normal", "large"], "type": "string"}, {"type": "null"}]} |
|
breakout_time_before |
query | No | {"anyOf": [{"type": "string", "pattern": "^(09:[3-5][0-9]|1[0-5]:[0-5][0-9]|16:00)$"}, {"type": "null"}]} |
Responses
Section titled “Responses”{ "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExcursionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }}