API reference
Every operation of the engine's HTTP API, version 0.1.0-alpha.5, with its parameters, bodies and responses.
The local engine's HTTP surface, served on loopback only. Every route but GET /v1/health sits behind bearer-token verification. Non-resource replies use the Standard envelope (result/message/details/timestamp).
This page describes version 0.1.0-alpha.5 of the API.
Address
http://127.0.0.1: Loopback only; the port(s) come fromserver.hostsin config.yaml
Authentication
A Cognito access token (token_use == "access"). Every route but GET /v1/health requires one. The websocket upgrade at /v1/events takes the same token via Sec-WebSocket-Protocol: v1.updates.neurotrader, auth.bearer.<token> because browsers cannot set Authorization on a handshake.
See Authentication for how a client obtains a token.
Health
Liveness, unauthenticated
GET /v1/health
Liveness, and the one version a client can read without a credential.
Authentication: none.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | HealthResponse (application/json) | The engine is up |
Info
What this binary is
GET /v1/info
The facts about this binary: version, commit, build, target.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | InfoResponse (application/json) | Unknown values are null, never omitted |
Catalog
The asset catalog: assets, tickers and venues, and the venues a live source streams from
GET /v1/asset
Every asset in the catalog, optionally narrowed by type.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
type | query | string | No | An asset type: fiat, crypto, stock, etf or fund |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of object (application/json) | Assets, as neurotrader_market_data::Asset serializes |
| 400 | string (text/plain) | Unknown type value |
GET /v1/ticker
Every ticker in the catalog, narrowed by any combination of filters, or found by text.
Filters intersect; they never union. base and quote are asset ids; market, broker and
provider are the catalog's enum names. A ticker that reached the catalog through a data
provider has no broker, so broker=… never matches one.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | No | Text search over symbols and asset names, case-insensitive, ranked: exact symbol, symbol prefix, the base asset's symbol, then its name. At most 200 hits, before the other filters narrow them |
symbol | query | string | No | The provider's symbol, exactly, case included, e.g. BTCEUR. Unique only together with provider and market |
base | query | string | No | Base asset id |
quote | query | string | No | Quote asset id |
market | query | string | No | Venue code, e.g. XNAS or binance; see GET /v1/venue |
broker | query | string | No | Broker enum name |
provider | query | string | No | Historical data provider enum name |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of object (application/json) | Tickers, as neurotrader_market_data::Ticker serializes, each with a coverage object beside its fields: intervals (the SDK's codes), from (earliest date, or null to ask the provider) and live |
| 400 | string (text/plain) | Unknown enum value, named in the body |
GET /v1/venue
Every venue the catalog lists.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of object (application/json) | Venues, as neurotrader_market_data::Venue serializes: code (ISO 10383 MIC where one exists, else a lowercase code of the catalog's own), name, mic, country |
GET /v1/venue/live
Every venue a live data source can stream from.
Not the catalog's venues and not GET /v1/ticker's provider (the historical data provider):
these are the values a live data source's venue takes. Each names the catalog market its
tickers must be listed on, so a client can offer only the pairs a venue streams.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of LiveVenueView (application/json) | Every quant::data::LiveVenue, in the order a client lists them |
Runner
Runners: create, configure, operate
GET /v1/runner
Every runner the engine holds.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
type | query | string | No | all, simulation, or live (any live kind — today paper); anything else is refused |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of object (application/json) | Runners, as core::runner::Runner serializes |
| 400 | Standard (application/json) | Invalid type |
POST /v1/runner
Creates a runner, bare or whole.
The body is a RunnerDescription: a type tag (simulation | multi_simulation |
sweep_simulation | paper | multi_paper | sweep_paper) over a SimulationDescription —
name, broker account (initial_holdings, mandatory primary_quote_asset, fees), and optionally
the same data and algorithms payloads the incremental routes take — or the venue tag over a
VenueDescription: name, venue, environment (demo is the one offered in this release),
credential (the name of a stored secret, never the secret), primary_quote_asset, and the same
optional data and algorithms. The tag alone decides the kind and the arrangement. The sweep_ tags make an instrument sweep: the multi_ arrangement,
with sweep: true on the runner, and a run is refused unless every instance runs the same
algorithm with the same parameters over exactly one data source of its own, all at one
interval.
Creation checks that the primary quote asset is funded and that any inline data source matches
the kind (the simulation tags take only historical sources, the paper tags only live),
and nothing else; a runner that cannot yet run is accepted exactly as the incremental routes
leave one. The one plan question asked here: multi_simulation and sweep_simulation need the lease feature
runs.multi, refused with 403 feature_not_in_plan (details.feature). With entitlement
configured, the caller's token first mints or refreshes the lease where that is due, so a
freshly enrolled engine is not refused for a lease nobody has asked for yet; a refusal comes
only from what then stands on disk, as the device routes' own (404 not_enrolled, 409
lease_unusable). multi_paper and sweep_paper are live runners and do not need the feature.
Authentication: an access token. See Authentication.
Request body
object (application/json), required.
A core::runner::RunnerDescription
Responses
| Status | Body | Description |
|---|---|---|
| 201 | object (application/json) | The created runner, as core::runner::Runner serializes |
| 403 | Standard (application/json) | The plan lacks a feature the runner needs; details.reason is feature_not_in_plan and details.feature names it |
| 404 | Standard (application/json) | Entitlement is configured and this engine is not enrolled: details.reason is not_enrolled |
| 409 | Standard (application/json) | No usable lease: details.reason is lease_unusable |
| 500 | Standard (application/json) | Refused, with the reason in details.error |
GET /v1/runner/{id}
One runner.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The runner, as core::runner::Runner serializes |
| 404 | Standard (application/json) | No such runner |
PATCH /v1/runner/{id}
Updates a runner's own fields — name, favourite, broker configuration.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
Request body
object (application/json), required.
A core::runner::RunnerUpdate: a type tag (simulation | paper, which must name the runner's own kind) over the fields to change
Responses
| Status | Body | Description |
|---|---|---|
| 204 | None | Updated |
| 404 | Standard (application/json) | No such runner, or the update was refused |
DELETE /v1/runner/{id}
Deletes a runner and everything it recorded.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
Responses
| Status | Body | Description |
|---|---|---|
| 204 | None | Deleted |
| 404 | Standard (application/json) | No such runner |
GET /v1/runner/{simulation_id}/algorithm
The algorithm instances a runner binds.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
simulation_id | path | string (uuid) | Yes | Runner id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of object (application/json) | Instances, as AlgorithmInstance serializes |
| 404 | Standard (application/json) | No such runner |
POST /v1/runner/{simulation_id}/algorithm
Adds an algorithm instance to a runner.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
simulation_id | path | string (uuid) | Yes | Runner id |
Request body
object (application/json), required.
An AlgorithmDescription: the algorithm definition id, the data source ids it consumes, and its parameters
Responses
| Status | Body | Description |
|---|---|---|
| 201 | Standard (application/json) | Added; details.algorithm_instance_id names the instance |
| 400 | Standard (application/json) | Refused, with the reason in details.error |
PATCH /v1/runner/{simulation_id}/algorithm/{algorithm_id}
Changes one algorithm instance: its data sources or its parameters.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
simulation_id | path | string (uuid) | Yes | Runner id |
algorithm_id | path | string (uuid) | Yes | Algorithm instance id |
Request body
ChangeAlgorithmRequest (application/json), required.
Responses
| Status | Body | Description |
|---|---|---|
| 202 | None | Changed |
| 204 | Standard (application/json) | Runner or instance not found (historical quirk: reported as 204 with an error envelope) |
| 500 | Standard (application/json) | The change could not be persisted |
DELETE /v1/runner/{simulation_id}/algorithm/{algorithm_id}
Removes an algorithm instance from a runner.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
simulation_id | path | string (uuid) | Yes | Runner id |
algorithm_id | path | string (uuid) | Yes | Algorithm instance id |
Responses
| Status | Body | Description |
|---|---|---|
| 204 | None | Removed |
| 400 | Standard (application/json) | Refused, with the reason in details |
| 404 | Standard (application/json) | No such runner |
POST /v1/runner/{simulation_id}/data
Adds a data source to a runner.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
simulation_id | path | string (uuid) | Yes | Runner id |
Request body
object (application/json), required.
A quant::data::DataSourceDescription: a type tag (historical, with ticker, interval and range, or live, with ticker, interval and venue). A simulation takes only historical sources, a paper runner only live ones
Responses
| Status | Body | Description |
|---|---|---|
| 201 | string (uuid) (text/plain) | The minted data source id |
| 400 | Standard (application/json) | Refused, with the reason in details.error |
DELETE /v1/runner/{simulation_id}/data
Removes data sources from a runner.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
simulation_id | path | string (uuid) | Yes | Runner id |
Request body
array of string (uuid) (application/json), required.
The data source ids to remove
Responses
| Status | Body | Description |
|---|---|---|
| 204 | None | Removed |
| 400 | Standard (application/json) | Refused, with the reason in details.error |
POST /v1/runner/{simulation_id}/operate
Starts, stops, pauses, resumes or resets a runner.
start and resume answer 200 with the run's context id in details.context; stop and
pause answer 202 — the run winds itself down, and clients watch the runner's event topic for
the state_change. Starting a runner may first fill the data store, which needs the caller's
bearer token to forward to the Data Plane. The same token mints or refreshes the lease the
plan is read off, where that is due, before a backtest is gated on it.
The body is the bare operation word ("stop") or the object OperateRunnerBody. Stopping a
live runner needs the object with a disposition: close cancels its working orders and
flattens what its fills opened, leave lets them stand; the engine has no default, and a live
stop without one is a 400 with details.reason disposition_required. The run's topic then
carries a stopped payload with what the stop did, and the run record keeps it as stop.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
simulation_id | path | string (uuid) | Yes | Runner id |
Request body
object (application/json), required.
The operation word as a bare JSON string ("start", "stop", "pause", "resume", "reset"), or an OperateRunnerBody object; a live runner's stop needs the object with disposition close or leave
Responses
| Status | Body | Description |
|---|---|---|
| 200 | Standard (application/json) | Started / resumed / reset; for start and resume details.context is the run id |
| 202 | Standard (application/json) | Stopping / pausing; watch the runner's event topic. For a live stop details.disposition echoes what was asked |
| 400 | Standard (application/json) | A live runner's stop without a disposition: details.reason is disposition_required |
| 403 | Standard (application/json) | Start or resume of a backtest the plan does not allow: details.reason is feature_not_in_plan, details.feature the catalogue key |
| 404 | Standard (application/json) | No run in progress, or no paused run; or, on start and resume with entitlement configured, this engine is not enrolled (details.reason not_enrolled) |
| 409 | Standard (application/json) | The runner is paused; resume or stop it before starting. Or, on start and resume, no usable lease (details.reason lease_unusable). Or, on start, the runner as configured cannot run (details.reason not_runnable, details.message the refusing check's own words: a sanity check, a credential issued for another environment than the runner declares, an algorithm that could not be built) |
| 429 | Standard (application/json) | As many runs of this kind are executing as the plan allows: details.reason is concurrent_runs_exhausted for a backtest and live_runners_exhausted for a live runner, with details.limit and details.running. The two are counted apart |
| 500 | Standard (application/json) | The operation failed |
Live
The active run, addressed by its runner — doc/09. live-view.md
POST /v1/live/stop
Stops every active live run at once, Live Simulation and venue-backed alike, with one disposition
(doc/08. live-modes.md section 6.2). Backtests are not touched. The answer waits for each run to
act on the disposition and lists what its stop did: the orders cancelled, flattened, left standing
and failed, or why nothing was reported. An empty runs list means nothing live was active.
Authentication: an access token. See Authentication.
Request body
StopAllRequest (application/json), required.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | disposition as asked and runs, one entry per live run: runner_id, run_id, and outcome (disposition, cancelled, flattened, failed as {order, reason}, left, optional error) or error when the run reported nothing within its grace |
| 400 | None | No disposition, or one that is not close or leave |
GET /v1/live/{id}
The runner's active live run: the in-flight record a client starts from.
run_id is the topic of the run's step stream; history_from/history_to is the span the
in-memory history covers, which the three routes below answer from. Nothing here is on disk:
the record exists exactly as long as the run is registered, so every route of this family
answers 404 the moment nothing live is in progress — and for a backtest, which has no view.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The in-flight record, as core::runner::runner_controller_live::LiveRecord serializes: run_id, runner_id, clock, started_at, steps, history_from, history_to, warm_up (per instance: fed, warm, cold_reason), data, algorithms |
| 404 | Standard (application/json) | No such runner, no run in progress, or the run in progress is a backtest |
GET /v1/live/{id}/account
Every account event of one instance of the active live run, out of its in-memory history — the
same response as …/run/{run_id}/account, over the ring's events. Empty on a spot account.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
algorithm | query | string (uuid) | Yes | Algorithm instance id |
from | query | string | No | ISO 8601 instant ending in Z; clamped to the history's span |
to | query | string | No | ISO 8601 instant ending in Z; clamped to the history's span |
kind | query | string | No | Comma-separated kinds to keep; omit for every kind |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The list, as core::runner::run_account::AccountList serializes |
| 400 | Standard (application/json) | Malformed query |
| 404 | Standard (application/json) | No such runner, no live run in progress, or no such instance |
GET /v1/live/{id}/actions
Every order one instance of the active live run issued on one ticker, folded to one entry
each — the same response as …/run/{run_id}/actions.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
algorithm | query | string (uuid) | Yes | Algorithm instance id |
ticker | query | string (uuid) | Yes | Which of that algorithm's tickers the orders were on |
from | query | string | No | ISO 8601 instant ending in Z; matched against an order's submission |
to | query | string | No | ISO 8601 instant ending in Z |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The order list, as core::runner::run_actions::ActionList serializes, each order with its leverage and the margin_level it was submitted at |
| 400 | Standard (application/json) | Malformed query |
| 404 | Standard (application/json) | No such runner, no live run in progress, or no such instance |
GET /v1/live/{id}/data
The candles and indicator series of the active live run, out of its in-memory history.
The same response as …/run/{run_id}/data. from/to default to the history's span and are
clamped to it; limit keeps the newest that many candles of the window — a chart opens with
the latest candle and N before it, then pages back by moving to to the oldest shown.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
algorithm | query | string (uuid) | Yes | Algorithm instance id |
ticker | query | string (uuid) | Yes | Which of that algorithm's tickers to chart |
interval | query | string | Yes | Canonical interval spelling; may be coarser than the run's cadence, never finer |
from | query | string | No | ISO 8601 instant ending in Z; defaults to the history's span |
to | query | string | No | ISO 8601 instant ending in Z; defaults to the history's span |
limit | query | integer | No | Keep only the newest that many candles of the window |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The candle series with indicators, as core::runner::run_data::CandleSeries serializes |
| 400 | Standard (application/json) | Malformed query, or one this run cannot answer |
| 404 | Standard (application/json) | No such runner, or no live run in progress |
GET /v1/live/{id}/performance
The equity curve so far of one instance of the active live run — the same query, paging and
response as …/run/{run_id}/performance, the margin figures and their bucket rules included;
a spot runner answers 400 to those.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
algorithm | query | string (uuid) | Yes | Algorithm instance id |
resolution | query | string | Yes | Canonical interval spelling; may be coarser than the run's cadence, never finer |
from | query | string | No | ISO 8601 instant ending in Z; a cursor from a previous page |
direction | query | string | No | forward (default) or backward |
limit | query | integer | No | Points per page, 1 to 5000; 1000 by default |
type | query | string | No | Comma-separated, in the order wanted: percent (default), asset, both, liabilities, margin_level; the last two on a margin account only |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The performance series, as core::runner::performance::PerformanceSeries serializes; points are arrays as wide as type, margin_level as null while nothing is owed, reductions per column |
| 400 | Standard (application/json) | Malformed query, or one this run cannot answer |
| 404 | Standard (application/json) | No such runner, no live run in progress, or no such instance |
Run
A runner's recorded runs and their output
GET /v1/runner/{id}/run
Every recorded run of a runner.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of object (application/json) | Run records: each pairs the run's info.json (ExecutionInfo) with its results.json (RunResults) |
| 404 | Standard (application/json) | No such runner |
GET /v1/runner/{id}/run/{run_id}
One recorded run.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
run_id | path | string (uuid) | Yes | Run (execution context) id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The run record (ExecutionInfo + RunResults) |
| 404 | Standard (application/json) | No such run |
PATCH /v1/runner/{id}/run/{run_id}
Edits a run's label and tags. Absent fields are left untouched; tags replaces the whole list.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
run_id | path | string (uuid) | Yes | Run (execution context) id |
Request body
UpdateRunRequest (application/json), required.
Responses
| Status | Body | Description |
|---|---|---|
| 204 | None | Updated |
| 404 | Standard (application/json) | No such run, or the run is paused |
DELETE /v1/runner/{id}/run/{run_id}
Deletes one run — its whole output directory, and nothing else.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
run_id | path | string (uuid) | Yes | Run (execution context) id |
Responses
| Status | Body | Description |
|---|---|---|
| 204 | None | Deleted |
| 404 | Standard (application/json) | No such run |
| 409 | Standard (application/json) | The run is still in progress; stop it first |
| 500 | Standard (application/json) | The deletion failed |
GET /v1/runner/{id}/run/{run_id}/account
The account journal of one algorithm instance: every loan, repayment, interest charge, margin
call raised or cleared, liquidation and bankruptcy, each with the account after it
(doc/13. margin-and-leverage.md §9).
Rows come back ascending by seq, each as trading::journal::AccountEvent serializes — the
same row the live step frames quote — with margin_level as null while nothing is owed.
asset_id is the runner's primary quote asset, which assets, liabilities and equity are
in. Neither paged nor capped: a levered run writes an interest_charged row every candle, so
kind is how a client asks for the calls and liquidations alone. A spot run has no account
journal and answers an empty list, not 404: the account exists and nothing happened to it.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
run_id | path | string (uuid) | Yes | Run (execution context) id |
algorithm | query | string (uuid) | Yes | Algorithm instance id |
from | query | string | No | ISO 8601 instant ending in Z, inclusive, matched against the row's timestamp |
to | query | string | No | ISO 8601 instant ending in Z, exclusive, matched against the row's timestamp |
kind | query | string | No | Comma-separated kinds to keep: borrowed, repaid, interest_charged, margin_call, margin_call_cleared, liquidation, bankruptcy; omit for every kind |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The list, as core::runner::run_account::AccountList serializes: algorithm_id, asset_id, from, to, kinds (echoed, or null), events (each: sequence, timestamp, algorithm, kind, asset, amount, order, assets, liabilities, equity, margin_level or null) |
| 400 | Standard (application/json) | Malformed query |
| 404 | Standard (application/json) | No such run or instance, or the run is paused |
| 500 | Standard (application/json) | The read failed |
GET /v1/runner/{id}/run/{run_id}/actions
Every order one algorithm instance issued on one ticker, rolled up to one entry each.
Neither paged nor capped: the response grows with how much the algorithm traded. Each entry
carries, from the order's first journal row, leverage (the order's own; 1 on a spot order,
so a levered order is told apart by it) and margin_level (the account's when the order was
submitted; null while nothing was owed, and on a journal written before margin existed).
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
run_id | path | string (uuid) | Yes | Run (execution context) id |
algorithm | query | string (uuid) | Yes | Algorithm instance id |
ticker | query | string (uuid) | Yes | Which of that algorithm's tickers the orders were on |
from | query | string | No | ISO 8601 instant ending in Z, matched against submission |
to | query | string | No | ISO 8601 instant ending in Z, matched against submission |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The order list, as core::runner::run_actions::ActionList serializes: actions (one OrderAction per order, leverage and margin_level included), round_trips, unattributed_quantity |
| 400 | Standard (application/json) | Malformed query, or one this run cannot answer |
| 404 | Standard (application/json) | No such run, or the run is paused |
| 500 | Standard (application/json) | The read failed |
GET /v1/runner/{id}/run/{run_id}/data
The candles one algorithm instance saw for one ticker, with its indicator series folded onto the same buckets.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
run_id | path | string (uuid) | Yes | Run (execution context) id |
algorithm | query | string (uuid) | Yes | Algorithm instance id |
ticker | query | string (uuid) | Yes | Which of that algorithm's tickers to chart |
interval | query | string | Yes | Canonical interval spelling; may be coarser than the run's cadence, never finer |
from | query | string | No | ISO 8601 instant ending in Z; defaults to the run's own range |
to | query | string | No | ISO 8601 instant ending in Z; defaults to the run's own range |
direction | query | string | No | Which end of the window limit counts from: forward (default) keeps the oldest candles, backward the newest |
limit | query | integer (int32) | No | At most this many candles, counted from the end direction names; omit for the whole window |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The candle series with indicators |
| 400 | Standard (application/json) | Malformed query, or one this run cannot answer |
| 404 | Standard (application/json) | No such run, or the run is paused |
| 500 | Standard (application/json) | The read failed |
POST /v1/runner/{id}/run/{run_id}/operate
Stops one specific run. Only stop applies here; everything else is runner-level. A live run's
stop needs a disposition, as on the runner-level route.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
run_id | path | string (uuid) | Yes | Run (execution context) id |
Request body
object (application/json), required.
"stop", or an OperateRunnerBody with operation stop and, for a live run, disposition close or leave
Responses
| Status | Body | Description |
|---|---|---|
| 202 | Standard (application/json) | Stopping; watch the runner's event topic |
| 400 | Standard (application/json) | The command is not applicable to a single run, or a live run's stop carries no disposition (details.reason disposition_required) |
| 404 | Standard (application/json) | No run in progress with this id |
| 500 | Standard (application/json) | The stop failed |
GET /v1/runner/{id}/run/{run_id}/performance
One algorithm instance's equity curve for a run.
Points are valued in the runner's primary quote asset — there is no denominator to ask for. Paused runs answer 404: their output is parked, not merged.
type names the figures each point carries, comma-separated and in the order wanted:
percent (the default), asset (equity), both (the two, in that order), and on a margin
account liabilities and margin_level. A spot run, or a timeline written before margin
existed, answers 400 to the two margin figures rather than a column of zeroes. Each point is an
array as wide as the list, timestamp first; margin_level is null while nothing is owed. A
resolution bucket reduces to one row per figure: the last row for percent and asset, the
lowest row for margin_level and the highest for liabilities, so the curve shows how
close the account came to the call bar inside the period rather than where it closed; the
response states the rule per column in reductions.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
run_id | path | string (uuid) | Yes | Run (execution context) id |
algorithm | query | string (uuid) | Yes | Algorithm instance id — a key of the runner's algorithms, not a definition id |
resolution | query | string | Yes | Canonical interval spelling: 1m, 1h, 1d, 1w, 1mo, … |
from | query | string | No | ISO 8601 instant ending in Z; omitted on the first page |
direction | query | string | No | forward (default) or backward |
limit | query | integer (int32) | No | Points per page, clamped to the server's maximum |
type | query | string | No | What each point states, comma-separated and in the order wanted: percent (default), asset, both, liabilities, margin_level; the last two on a margin account only |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The series, as core::runner::performance::PerformanceSeries serializes: type echoed, asset_id, reductions (per column: last, lowest or highest), and points as arrays as wide as type, timestamp first, margin_level as null while nothing is owed |
| 400 | Standard (application/json) | Malformed query, or one this run cannot answer |
| 404 | Standard (application/json) | No such run, or the run is paused |
| 500 | Standard (application/json) | The read failed |
POST /v1/runner/{id}/run/{run_id}/restore
Restores the runner's parameters from the snapshot stored with one of its past runs.
Config, data sources and algorithms only — never name, status, favourite or identity. No body: the run id says everything.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Runner id |
run_id | path | string (uuid) | Yes | Run (execution context) id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The runner as it now stands, same shape as GET /v1/runner/{id} |
| 404 | Standard (application/json) | No such run |
| 409 | Standard (application/json) | The runner has a run in flight |
| 500 | Standard (application/json) | The restore failed |
Algorithm
The algorithms the engine knows about
GET /v1/algorithms
Every algorithm the engine knows about, and whether each can actually run.
Each entry is a flattened algorithm Definition plus available: bool. false means the
algorithm's library is registered and did not load this start — it does not mean unknown; an
unknown algorithm is simply absent.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of object (application/json) | Sorted by name |
Repository
The local market-data store and downloads into it
GET /v1/repository
What the local store holds, per ticker: provider, symbol, and the contiguous ranges on disk.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of object (application/json) | RepositoryInfo records, keyed by ticker |
| 500 | string (text/plain) | The store could not be read |
POST /v1/repository
Starts a download into the store, through the Data Plane.
The caller's bearer token is forwarded — every Data Plane request needs it alongside the lease
the engine mints against it. The reply's details.topic is the job id to subscribe to on
/v1/events for progress.
Authentication: an access token. See Authentication.
Request body
CreateRepositoryRequest (application/json), required.
Responses
| Status | Body | Description |
|---|---|---|
| 201 | Standard (application/json) | Task created; details.topic is the event topic |
| 500 | Standard (application/json) | The download could not be started |
GET /v1/repository/job
Every download job this engine remembers: running ones first, then the finished ones it has kept (the most recent 256), newest first.
What a client that reloaded reads to find the downloads it started. Each job's topic is its
id, and its progress fields repeat the last DataEvent published there — the socket is the
hint, this is the state.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of JobResponse (application/json) | Running first, then finished, newest first |
GET /v1/repository/job/{id}
One download job, by the id POST /v1/repository answered with.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | The job id, which is also its event topic |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | JobResponse (application/json) | The job |
| 404 | Standard (application/json) | No such job: it never ran here, or was pruned |
Secret
Credentials in the platform key store; nothing is ever read back
GET /v1/secret
Every secret the engine knows how to hold: its form, and whether it is stored.
Nothing here — or anywhere — reads a credential back; the only fact reported about a stored secret is that it is stored.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of SecretStatus (application/json) | One status per known secret |
| 503 | Standard (application/json) | The platform key store could not be asked |
GET /v1/secret/{name}
One secret's form and whether it is stored.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | Yes | The secret's name, e.g. binance.credentials |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | SecretStatus (application/json) | The status |
| 404 | Standard (application/json) | No secret goes by that name |
| 503 | Standard (application/json) | The platform key store could not be asked |
PUT /v1/secret/{name}
Stores a filled-in form, replacing whatever was there.
The body is the secret's own fields, as the form describes them — a bare JSON object, never echoed and never logged.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | Yes | The secret's name, e.g. binance.credentials |
Request body
object (application/json), required.
The fields the secret's form declares
Responses
| Status | Body | Description |
|---|---|---|
| 200 | Standard (application/json) | Stored |
| 400 | Standard (application/json) | The form was wrong, or the platform refused it |
| 404 | Standard (application/json) | No secret goes by that name |
| 409 | Standard (application/json) | Something is stored and cannot be used; clear and re-enter |
| 503 | Standard (application/json) | The platform key store could not be asked |
DELETE /v1/secret/{name}
Clears a stored secret.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | Yes | The secret's name, e.g. binance.credentials |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | Standard (application/json) | Cleared |
| 404 | Standard (application/json) | No secret goes by that name, or nothing was stored |
| 503 | Standard (application/json) | The platform key store could not be asked |
POST /v1/secret/{name}/api-key
Completes a generated credential with the API key the venue issued for its public half.
The body is never echoed and never logged.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | Yes | The secret's name |
Request body
ApiKeyRequest (application/json), required.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | Standard (application/json) | Completed |
| 404 | Standard (application/json) | No secret goes by that name, or nothing is stored |
| 409 | Standard (application/json) | The stored credential is not awaiting an API key, or the key cannot be taken |
| 503 | Standard (application/json) | The platform key store could not be asked |
POST /v1/secret/{name}/generate
Generates an Ed25519 key pair for the venue and stores the private half under the secret's name, replacing whatever was there.
The answer is the public half as PEM, for the user to register on the venue's API management
page; the private half goes from the generator into the key store and nowhere else, which is the
reason the engine generates the pair rather than taking one. The credential then awaits its API
key (awaiting_api_key on its status) and is not usable until POST .../api-key completes it.
Only binance.credentials has a generator.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | Yes | The secret's name; binance.credentials is the one with a generator |
Request body
GenerateRequest (application/json), required.
Responses
| Status | Body | Description |
|---|---|---|
| 201 | GeneratedKey (application/json) | The public half of the generated pair |
| 404 | Standard (application/json) | No secret goes by that name |
| 503 | Standard (application/json) | The platform key store could not be asked |
Device
Enrolment: this engine is the device
GET /v1/device
Where this engine stands: enrolment, entitlement view, seats.
Answers 200 even when no entitlement server is configured or the configured one is
unreachable — unavailable says so — because "not enrolled" and "cannot currently say" call
for different screens.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | configured, enrolled, belongs_to_caller, holds_key, the device record, the entitlement view, the account's devices |
| 502 | Standard (application/json) | The Entitlement Server refused or could not be reached; details.reason carries its reason |
POST /v1/device
Enrols this engine, spending one of the account's seats. The engine is the device: it generates the keypair, and the caller's bearer token names the account.
Authentication: an access token. See Authentication.
Request body
EnrolRequest (application/json), required.
Optional; only the label is the client's to say
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The enrolled device: id, label, platform, client version, key algorithm, state |
| 502 | Standard (application/json) | The Entitlement Server refused; details.reason carries its reason (out of seats, not entitled, …) |
DELETE /v1/device
De-enrols this engine. The seat is released into the server's cooldown, and the local key material is forgotten.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | Standard (application/json) | De-enrolled; details.seats is the seat position left behind |
| 502 | Standard (application/json) | The Entitlement Server refused or could not be reached |
POST /v1/device/lease
Mints or refreshes the entitlement lease, installing the cache keys it carries into RAM.
The lease envelope itself is deliberately absent from the answer — it is a credential the Data Plane accepts, and a client holding one could present it without this engine.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | plan, features, expires_at, not_after, epoch, cache_readable |
| 502 | Standard (application/json) | The Entitlement Server refused or could not be reached |
Billing
Changing the plan this account is on
GET /v1/billing/plans
The plan menu a purchase page is drawn from: every plan on sale, in catalogue order.
Relayed from the Entitlement Server's GET /v1/plans with the caller's token, and not in the
standard envelope: the 200 body is that service's document unchanged, \{ amounts_available, plans: [\{ key, display_name, features, quotas, seats, prices: [\{ id, interval, amount?, currency? \}] \}] \},
described in its doc/API.md, "The plan menu". amounts_available: false means the provider
could not be asked; the plans are still listed and buying still works. To buy, send a plan's
key and a price's interval to POST /v1/billing/session.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | object (application/json) | The Entitlement Server's plan menu, unchanged |
| 401 | Standard (application/json) | The Entitlement Server would not take the token (unauthenticated, expired_token); relayed with its reason |
| 501 | Standard (application/json) | This engine has no entitlement server configured (entitlement_not_configured) |
| 503 | Standard (application/json) | The menu cannot be read right now: the Entitlement Server could not be reached or answered a 5xx. details.reason keeps its reason where it gave one |
POST /v1/billing/session
Opens a checkout or management page at the payment provider, and starts watching for the plan to move.
200, not 201: the page was created by the Entitlement Server. The URL leaves in this response
and is retained nowhere — a portal link is spent when followed. details.topic is the session's
event topic.
Authentication: an access token. See Authentication.
Request body
SessionRequest (application/json), required.
Optional; no body means "manage what I have"
Responses
| Status | Body | Description |
|---|---|---|
| 200 | Standard (application/json) | details.url to open, its kind, the topic to watch, and expires_at when the provider set one |
| 400 | Standard (application/json) | Relayed from the Entitlement Server with its reason. interval_required (the plan is sold at several intervals and none was named) and unknown_interval (it is not sold at the one named) carry details.details.plan_key and details.details.intervals, the intervals the plan is sold at |
| 429 | Standard (application/json) | A session is already in flight; Retry-After says when to ask again |
| 502 | Standard (application/json) | The Entitlement Server refused or could not be reached |
GET /v1/billing/session/{session_id}
What became of one plan change — the fallback for a client that reloaded and lost its
websocket. No url field, in any state.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
session_id | path | string (uuid) | Yes | The session id POST /v1/billing/session handed back as topic |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | Standard (application/json) | state, requested_plan, plan_before, plan_after, kind, timestamps, reason |
| 404 | Standard (application/json) | No such session |
Legal
The legal documents a user must agree to, relayed to the Entitlement Server
POST /v1/legal/acceptances
Records the caller's agreement to the documents named, and answers with the standing afterwards.
The user agent is taken from this request; a client cannot supply its own origin, and anything it
sends as remote_addr or user_agent is ignored.
Authentication: an access token. See Authentication.
Request body
LegalAcceptance (application/json), required.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | LegalStanding (application/json) | Recorded; the body is the standing afterwards |
| 400 | Standard (application/json) | A document this deployment does not declare (unknown_legal_document), or an unreadable body |
| 409 | Standard (application/json) | The version accepted is no longer in force (legal_version_stale); details.details.current_version names the one that is |
| 501 | Standard (application/json) | This engine has no entitlement server configured (entitlement_not_configured) |
| 503 | Standard (application/json) | Nothing was recorded: the Entitlement Server could not be reached or would not take the call |
GET /v1/legal/standing
The legal documents in force, and where the caller's account stands against each. Relayed to the Entitlement Server with the caller's token; nothing is cached or decided here.
Reachable on an engine that is not enrolled: consent comes before a seat is spent.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | LegalStanding (application/json) | The documents in force and this account's position against each |
| 501 | Standard (application/json) | This engine has no entitlement server configured (entitlement_not_configured) |
| 503 | Standard (application/json) | The standing cannot be checked right now. Never a statement that the caller has not agreed |
Plugin
The algorithm plugin catalog: upload, link, load, unload, build, remove
GET /v1/plugin
Every catalogued plugin, with the state this process holds it in.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | array of PluginResponse (application/json) | The catalog |
POST /v1/plugin/link
Links a Rust project on the engine's machine and starts its first build.
Answers before the build runs, with the entry in the building state. The outcome lands in the
entry's state and on the catalog topic: build_started, build_finished with the log's tail,
then loaded or failed. The whole log is in the plugin's build.log. The build command runs
as the engine's user; under an installed Windows service that user has no toolchain, and the
failure says so.
Authentication: an access token. See Authentication.
Request body
LinkPluginRequest (application/json), required.
Responses
| Status | Body | Description |
|---|---|---|
| 202 | PluginResponse (application/json) | Linked; building |
| 400 | Standard (application/json) | invalid_project_dir, not_a_rust_project or invalid_name |
| 409 | Standard (application/json) | plugin_exists |
| 500 | Standard (application/json) | catalog_unwritable |
POST /v1/plugin/reload
Reloads every plugin that is neither in use nor being built, and reports what happened to each
under details.reloaded, details.skipped and details.failed.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 200 | Standard (application/json) | Per-plugin outcomes |
POST /v1/plugin/upload
Uploads a built package, validates it in a subprocess, files it under the library's own name and loads it.
multipart/form-data with the file in a part named package. A native library for this
platform and nothing else: .whl and .jar are refused with unsupported_package. A second
upload under a name the catalog holds is refused with plugin_exists unless
?override=true, and then only when no run in flight binds the plugin being replaced
(plugin_in_use, with the runs). The reply is the entry, loaded or failed with the reason.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
override | query | boolean | No | Replace a plugin already filed under this name |
Request body
any (multipart/form-data), optional.
The package, in a part named package
Responses
| Status | Body | Description |
|---|---|---|
| 201 | PluginResponse (application/json) | Installed and loaded, or installed and failed |
| 400 | Standard (application/json) | unsupported_package, not_loadable, invalid_name or bad_upload |
| 409 | Standard (application/json) | plugin_exists, plugin_in_use, plugin_building or algorithm_id_clash |
| 413 | Standard (application/json) | package_too_large: more than 50 MiB |
| 500 | Standard (application/json) | catalog_unwritable |
GET /v1/plugin/{id}
One catalogued plugin.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Plugin id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | PluginResponse (application/json) | The entry |
| 404 | Standard (application/json) | no_such_plugin |
DELETE /v1/plugin/{id}
Removes a plugin: unloads it, forgets its algorithms and deletes its files. A run in flight that bound one of its algorithms keeps the code until it ends; the removal is refused while one exists.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Plugin id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | Standard (application/json) | Removed |
| 404 | Standard (application/json) | no_such_plugin |
| 409 | Standard (application/json) | plugin_in_use or plugin_building |
| 500 | Standard (application/json) | catalog_unwritable |
POST /v1/plugin/{id}/build
Rebuilds a linked project. The current generation stays loaded while the build runs; when it succeeds and nothing in flight binds the plugin, what it produced is installed as the next generation and loaded. Linked plugins only.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Plugin id |
Responses
| Status | Body | Description |
|---|---|---|
| 202 | PluginResponse (application/json) | Building |
| 404 | Standard (application/json) | no_such_plugin |
| 409 | Standard (application/json) | not_linked or plugin_building |
POST /v1/plugin/{id}/load
Loads a plugin that is unloaded or failed.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Plugin id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | PluginResponse (application/json) | Loaded |
| 400 | Standard (application/json) | not_loadable; the entry is now failed with the reason |
| 404 | Standard (application/json) | no_such_plugin |
| 409 | Standard (application/json) | already_loaded or plugin_building |
POST /v1/plugin/{id}/reload
Unloads and loads again. Refused while a run in flight binds one of its algorithms.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Plugin id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | PluginResponse (application/json) | Loaded |
| 400 | Standard (application/json) | not_loadable; the entry is now failed with the reason |
| 404 | Standard (application/json) | no_such_plugin |
| 409 | Standard (application/json) | plugin_in_use or plugin_building |
POST /v1/plugin/{id}/unload
Unloads a plugin. Its algorithms stay named and stop being constructible; a runner bound to one is told it is not loaded when it starts. Refused while a run in flight binds one.
Authentication: an access token. See Authentication.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | Plugin id |
Responses
| Status | Body | Description |
|---|---|---|
| 200 | PluginResponse (application/json) | Unloaded |
| 404 | Standard (application/json) | no_such_plugin |
| 409 | Standard (application/json) | plugin_in_use, not_loaded or plugin_building |
Events
The realtime websocket
GET /v1/events
The realtime websocket: topic-scoped subscribe/unsubscribe over the event bus.
The token rides in Sec-WebSocket-Protocol as auth.bearer.<token> beside the protocol name,
because browsers cannot set Authorization on a handshake; Authorization wins when both are
present. A refusal is an HTTP 401 before the upgrade, never a close frame. After the upgrade
the server sends an unprompted welcome frame; clients speak JSON commands (ping,
subscribe, unsubscribe) and receive topic-scoped events. See doc/07. realtime-updates.md for
the frame vocabulary — a websocket conversation is beyond what OpenAPI describes.
Authentication: an access token. See Authentication.
Responses
| Status | Body | Description |
|---|---|---|
| 101 | None | Switching protocols; the selected subprotocol is the single real protocol name |
| 401 | None | The handshake carried no valid token |
Schemas
AcceptedLegalDocument
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | |
version | string | Yes | The version the user was shown. Compared for equality with the version in force, so a consent screen left open while the document was revised is refused rather than recorded. |
ApiKeyRequest
POST /v1/secret/{name}/api-key: the API key the venue issued for the generated public key.
Deserialize only. A [SecretString] has no Serialize, so this body cannot be echoed by any
response type.
| Field | Type | Required | Description |
|---|---|---|---|
api_key | string | Yes |
ChangeAlgorithmRequest
One of the following:
| Field | Type | Required | Description |
|---|---|---|---|
data | array of string (uuid) | Yes | |
type | "add_data_provider" | Yes |
| Field | Type | Required | Description |
|---|---|---|---|
data | array of string (uuid) | Yes | |
type | "remove_data_provider" | Yes |
| Field | Type | Required | Description |
|---|---|---|---|
params | any | Yes | |
type | "change_parameters" | Yes |
CreateRepositoryRequest
| Field | Type | Required | Description |
|---|---|---|---|
end | string (date-time) | Yes | |
interval | string | Yes | The candle interval, in its canonical serde spelling: 1m, 1h, 1d, 1w, 1mo, … Example: "1h" |
start | string (date-time) | Yes | |
ticker | string (uuid) | Yes | Which ticker to fetch. A TickerId rather than an exchange symbol: the id names the provider too (via the asset catalog), and a symbol like BTCEUR does not — it is only unique within one provider. |
EnrolRequest
What a client may say about the machine it is enrolling. Only the label, and only because it is what the user sees in their own device list — everything else about this machine the engine knows better than the client does.
| Field | Type | Required | Description |
|---|---|---|---|
label | string or null | No |
FieldKind
How a field is entered. Secret is the instruction to mask it; nothing here changes how the
engine treats the value, which is masked in every direction regardless.
One of: "text", "secret", "choice".
FieldOption
| Field | Type | Required | Description |
|---|---|---|---|
label | string | Yes | |
value | string | Yes |
FormField
| Field | Type | Required | Description |
|---|---|---|---|
default | string or null | No | What the engine assumes when the field is omitted, if anything. |
help | string | Yes | |
key | string | Yes | |
kind | FieldKind | Yes | |
label | string | Yes | |
multiline | boolean | Yes | Whether the value may span lines. A PEM private key does. |
options | array of FieldOption | Yes | The permitted values of a [FieldKind::Choice], empty for anything else. |
required | boolean | Yes |
GenerateRequest
POST /v1/secret/{name}/generate: which environment the key pair is for.
| Field | Type | Required | Description |
|---|---|---|---|
environment | string | Yes | Which venue the key will be registered at. A Demo Mode key is valid nowhere else, and a venue runner is refused a key issued for another environment than it declares. Example: "demo" |
GeneratedKey
What a generated key pair answers with: the public half, and nothing else of the pair.
| Field | Type | Required | Description |
|---|---|---|---|
environment | string | Yes | |
key_type | string | Yes | Always ed25519: the one key type the venue's session logs on with. |
name | SecretName | Yes | |
public_key | string | Yes | The public key as PEM, for the user to paste into the venue's API management page. The private half is in the key store and nowhere else. |
HealthResponse
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
time | string | Yes | |
version | string | Yes | The engine's version, from [crate::build_info] and never written out here. This is the one version a client can read without a credential — GET /v1/info is behind the token layer with everything else — so it is what an About box shows before anyone has logged in. Example: "0.0.1" |
InfoResponse
The facts about this binary, as a client renders them.
A plain resource rather than an [crate::api::responses::Standard] envelope, the way
[crate::api::health] is: the envelope is for replies that are not a thing.
Unknown values are null rather than omitted. A GUI drawing a fixed list of rows should not
have to tell a missing key from an unknown value, and serde writes None as null here
precisely because nothing carries skip_serializing_if.
| Field | Type | Required | Description |
|---|---|---|---|
branch | string or null | No | The branch at build time; null on a detached HEAD as well as with no repository. |
build_id | string or null | No | The CI run id, which is what addresses that run's logs. |
build_number | integer (int64) or null (int64) | No | The CI run number, null for a build from a developer's machine. |
built_at | string | Yes | When the build script last ran, RFC 3339 in UTC. |
commit | string or null | No | The full commit hash, or null when the build had no repository to read. |
commit_date | string or null | No | The commit's own date, which a rebuild of an old tag does not move. |
commit_short | string or null | No | The first eight characters of the hash — what a person quotes. |
dirty | boolean or null | No | Whether tracked files were modified at build time, or null when there was no way to tell. |
name | string | Yes | The binary's name. |
os | string | Yes | The operating system this process is running on, which for a cross-compiled build is not something [InfoResponse::target] can be read off. |
profile | string | Yes | debug or release. |
rustc | string | Yes | The compiler, as it reported itself. |
target | string | Yes | The target triple this was compiled for — also the one a plugin must match. |
version | string | Yes | The version in Cargo.toml. |
JobResponse
One download job: what was asked for, its state, and the last progress said on its topic.
The progress fields repeat the last event published on the job's topic (DataEvent, tagged on
kind): completed and total count objects — months of one series — and message is the
sentence a client can show. A client that subscribed late, or reloaded, reads here what it
missed; one that is subscribed hears the same figures a frame at a time. The socket is the hint
and this is the state.
| Field | Type | Required | Description |
|---|---|---|---|
completed | integer or null | No | Objects settled so far, from the last event that counted them; null before the first. |
end | string (date-time) | Yes | |
error | string or null | No | Why the job failed; null unless state is failed. |
finished_at | string (date-time) or null (date-time) | No | |
id | string (uuid) | Yes | The job id, which is also the topic it reports on. |
interval | string | Yes | Example: "1h" |
message | string or null | No | The last sentence published on the topic. |
start | string (date-time) | Yes | |
started_at | string (date-time) | Yes | |
state | JobStatus | Yes | |
ticker | string (uuid) | Yes | |
total | integer or null | No | Objects the request resolved to, from the same event. |
JobStatus
How far a download job has got, as GET /v1/repository/job/{id} answers it.
One of: "running", "completed", "failed".
LegalAcceptance
What a client posts to record agreement.
Several documents at once is the ordinary case: one checkbox covers the terms and the privacy notice, and the server writes them in one transaction so that half of that click cannot land.
There is no field here for the connection's address or user agent. A client cannot report its
own origin as evidence — it would be evidence of whatever it chose to say — so the engine fills in
the user agent from the request it received, and anything a client sends under either name is
discarded by deserialization. See [Forwarded].
| Field | Type | Required | Description |
|---|---|---|---|
documents | array of AcceptedLegalDocument | Yes | |
method | LegalAcceptanceMethod | No | Where in the flow this was given. Defaults to reconsent, the answer that claims less: a client that forgot to say "signup" should not have that read into its request. |
LegalAcceptanceMethod
One of: "signup", "reconsent".
LegalDocument
One declared document, and where this account stands against it.
| Field | Type | Required | Description |
|---|---|---|---|
accepted_at | string (date-time) or null (date-time) | No | |
accepted_version | string or null | No | The version this account last accepted, whichever it was. Present and different from version is the revision case: "our terms have changed" rather than "please agree to our terms". |
blocking | boolean | Yes | Whether the product may be used without agreeing to this version. False for a document served as notice, such as a privacy policy — still listed, and acknowledging it is still recorded. |
display_name | string | Yes | |
key | string | Yes | The stable id — terms-of-service. It outlives versions, so it names none. |
satisfied | boolean | Yes | Whether accepted_version is the version in force. |
url | string or null | No | Where the text is published. The server does not hold the text; it holds which version of it this account agreed to. |
version | string | Yes | The version in force. An acceptance must name exactly this: a client posting "whatever is current" would be recording agreement to text it never displayed. |
LegalStanding
Where an account stands against every legal document the deployment declares.
blocked and outstanding are what a client's gate reads; documents is what it renders.
| Field | Type | Required | Description |
|---|---|---|---|
account_id | string (uuid) | Yes | |
blocked | boolean | Yes | Whether a blocking document is outstanding. A client that reads only this and outstanding is reading the answer correctly. |
documents | array of LegalDocument | Yes | |
outstanding | array of string | Yes | The keys of the blocking documents still to be accepted. |
LinkPluginRequest
Link a project directory on the engine's machine. POST /v1/plugin/link.
The engine builds the project, validates what the build produced, copies it into the catalog
and loads it; the route answers before any of that, with an entry in the building state and
the catalog topic to watch. Rust projects only — a Cargo.toml at the root is what makes a
directory one — until another runtime exists to host anything else.
| Field | Type | Required | Description |
|---|---|---|---|
artifact | string or null | No | Where the build leaves the library, relative to project_dir. Defaults to what cargo build --release produces for the project's own package or library name. |
build_command | string or null | No | What to run in project_dir to build it, through the platform shell. Defaults to cargo build --release. |
project_dir | string | Yes | An absolute path to the project's root, on the engine's own filesystem. Relative paths are refused rather than resolved: they would be interpreted against the engine's working directory, which is not something a client can see. |
rebuild | string or null | No | When the project is rebuilt once it is linked. Only manual exists; the build route is how a rebuild is asked for. |
LiveVenueView
A venue a live data source can stream from, as GET /v1/venue/live serves it.
Not a catalog venue (neurotrader_market_data::Venue): those are where tickers are listed, and this is where a live source
connects. The two meet at market, which is how a client narrows a ticker picker to the pairs a
venue can stream instead of letting the run refuse one later.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The wire value, exactly what a live data source's venue takes, e.g. binance. Example: "binance" |
market | string | Yes | The catalog venue code (Ticker.market, one of GET /v1/venue's codes) a ticker must be listed on to stream from this venue. |
name | string | Yes | The name a client shows, e.g. Binance. |
OperateRunnerBody
The object spelling of [OperateRunnerRequest], and the shape the API document shows.
| Field | Type | Required | Description |
|---|---|---|---|
disposition | string or null | No | What to do with a live run's working orders: close or leave. Required to stop a live run, ignored by a backtest, refused with any operation but stop. |
operation | Operation | Yes |
Operation
The operation word, in either spelling of the body.
One of: "start", "stop", "pause", "resume", "reset".
PluginResponse
One catalogued plugin, as the API reports it.
The entry's own shape, plus the state this process holds it in. algorithms is what the
library published when it was validated, not necessarily what it publishes now: the live
manifest is read at every load and always wins, and GET /v1/algorithms is where the live
answer is.
| Field | Type | Required | Description |
|---|---|---|---|
abi_version | integer (int32) | Yes | |
added_at | string (date-time) | Yes | |
algorithms | array of object | Yes | Each entry is an algorithm [Definition] as GET /v1/algorithms reports it. |
file | string | Yes | The file the engine loads, inside the plugin's directory under the storage directory. Empty for a linked project that has not been built yet. |
generation | integer (int32) | Yes | How many times this plugin has been installed, counting the first. |
id | string (uuid) | Yes | |
name | string | Yes | The name the plugin is filed under: its package name, lowercased. |
sdk_version | string | Yes | |
sha256 | string | Yes | SHA-256 of that file. What a record can name the code by. |
source | object | Yes | Where the code came from, and so whether the engine can rebuild it. |
state | object | Yes | loaded, unloaded, failed (with reason) or building. |
target | string | Yes | |
updated_at | string (date-time) | Yes |
ResponseType
One of: "Success", "Error".
SecretForm
One secret's form, as a client renders it.
| Field | Type | Required | Description |
|---|---|---|---|
description | string | Yes | |
fields | array of FormField | Yes | |
name | SecretName | Yes | |
title | string | Yes |
SecretName
The name of one secret form.
One of: "binance.credentials".
SecretStatus
One secret: its form, whether this machine holds it, which environment what it holds was issued for, and whether it is waiting for the venue to issue its API key.
The form is flattened in, so name, title, description and fields sit beside present in
one object — a client reads the list and has everything it needs to render and to show state.
Every field of each of:
| Field | Type | Required | Description |
|---|---|---|---|
awaiting_api_key | boolean | Yes | Whether the stored credential is a key pair this engine generated whose API key has not been registered yet (#206). The next step is then the user's: register the public key at the venue and submit the API key it issues. false whenever present is. |
environment | string or null | No | The environment the stored credential was issued for (mainnet, demo, testnet), so a client can tell before a start that a demo runner has no demo key to run with. null when nothing is stored. Not a secret: it names the host the key is valid at, never the key. Example: "demo" |
present | boolean | Yes | Whether a credential is stored under this name. Never anything about what it contains. |
SessionRequest
What a client is asking for.
Two optional fields, and the shape does not vary with the answer. A body whose fields depended on whether the account already subscribes would be the client making the choice again, one layer below the route that exists to make it for them.
| Field | Type | Required | Description |
|---|---|---|---|
interval | string or null | No | Which of the plan's prices, in the billing provider's own words: month, year. The values a plan is sold at are its prices[].interval on GET /v1/billing/plans. Absent means what the Entitlement Server says it means: the plan's only price, or interval_required when it is sold at several. It is forwarded only when present, and never checked here; an interval the plan is not sold at is that service's unknown_interval. |
plan_key | string or null | No | The plan the user wants, or absent for "let me manage what I have": payment method, invoices, cancellation. Naming the deployment's default plan is how a cancellation is spelled. |
Standard
The uniform envelope for replies that are not a resource: acknowledgements, refusals, and anything else where the answer is a sentence rather than a thing.
| Field | Type | Required | Description |
|---|---|---|---|
details | any | No | |
message | string | Yes | |
result | ResponseType | Yes | |
timestamp | string (date-time) | Yes |
StopAllRequest
The body of POST /live/stop (#299): one disposition for every active live run. Required, with
no default, for the reason the single stop has none.
| Field | Type | Required | Description |
|---|---|---|---|
disposition | string | Yes |
UpdateRunRequest
Fields left as None are left untouched. tags, when provided, replaces the whole list.
| Field | Type | Required | Description |
|---|---|---|---|
label | string or null | No | |
tags | array of string or null | No |
Reference
Lookup pages for the HTTP API, authentication, realtime updates, errors, plan limits, the built-in algorithms and the vocabulary.
Authentication
The access token every request carries, the header and websocket forms, device enrolment, the entitlement lease, and the status codes of a refused request.