API Documentation
The AGILERA Prediction Engine exposes a RESTful JSON API on port 8000. All endpoints accept and return application/json. Click any endpoint to expand its full request/response schema and a ready-to-run curl example.
10
Endpoints
17
Agents
US 63/889,131
Patent
1.0.0
Version
Base URL
https://api.agilera.ai(configured via NEXT_PUBLIC_AGILERA_ENGINE_URL)Run the full 17-agent ensemble and return a calibrated triple-barrier probability vector for a single event.
If `bars` is omitted, OHLCV data is automatically fetched from Polygon / Alpaca / Yahoo Finance based on configured API keys on the engine.
Request Body
| Field | Type | Req | Description |
|---|---|---|---|
| ticker | string | yes | Ticker symbol, e.g. "AAPL". |
| entry | float (> 0) | yes | Entry price for the triple-barrier event. |
| upper | float (> entry) | yes | Upper barrier price (must be greater than entry). |
| lower | float (< entry) | yes | Lower barrier price (must be less than entry). |
| vertical_bars | int [1–500] | no | Maximum number of bars before vertical expiry. Default: 20. |
| bars | BarData[] | no | Optional OHLCV bars array. Each bar: {time, open, high, low, close, volume}. Auto-fetched if omitted. |
Response
| Field | Type | Req | Description |
|---|---|---|---|
| event_id | string (UUID) | yes | Unique identifier for this prediction event. |
| ticker | string | yes | Ticker symbol (uppercase). |
| p_upper | float [0,1] | yes | Probability of upper barrier being hit first. |
| p_lower | float [0,1] | yes | Probability of lower barrier being hit first. |
| p_none | float [0,1] | yes | Probability of vertical expiry (neither barrier hit in time). |
| confidence | float [0,1] | yes | max(p_upper, p_lower, p_none) — strength of the top signal. |
| calibrated | boolean | yes | Whether Platt Scaling calibration was applied. |
| top_signal | "UPPER" | "LOWER" | "NONE" | yes | The highest-probability outcome. |
| agent_count | int | yes | Number of agents that contributed to the prediction. |
| agent_predictions | object | yes | Per-agent probability vectors: {agent_name: {p_upper, p_lower, p_none}}. |
| agent_weights | object | yes | Per-agent ensemble weights at prediction time: {agent_name: weight}. |
| timestamp | string (ISO-8601) | yes | UTC timestamp of the prediction. |
| ledger | object | yes | DDL-69 ledger format: {p_upper, p_lower, p_none} for ich8.org. |
Example
curl -X POST https://api.agilera.ai/predict \
-H "Content-Type: application/json" \
-d '{
"ticker": "AAPL",
"entry": 195.00,
"upper": 200.00,
"lower": 190.00,
"vertical_bars": 20
}'Shared Types
BarData
| Field | Type | Default |
|---|---|---|
| time | string | "" |
| open | float | 0.0 |
| high | float | 0.0 |
| low | float | 0.0 |
| close | float | 0.0 |
| volume | float | 0.0 |
Outcome enum
Used in POST /outcome and returned in prediction responses.
UPPERUpper barrier hit before lower and expiry
LOWERLower barrier hit before upper and expiry
NONEVertical expiry — neither barrier hit in time
AgentGrade enum
Requires a minimum of 5 predictions to move off the default B grade.
Saccuracy ≥ 70%
Aaccuracy ≥ 60%
Baccuracy ≥ 50% (or < 5 predictions)
Caccuracy ≥ 40%
Daccuracy ≥ 30%
Faccuracy < 30%