Errors
The error envelope of the HTTP API, the status codes in use, and the stable reason codes a client can branch on, grouped by area.
When the engine refuses a request, your client needs to know two things:
what to tell the person using it, and what to do next. The response carries
both. message is a sentence for a person. details.reason is a stable
code for your program. This page lists the envelope, the status codes and
the reason codes.
Envelope
A refusal, and any answer that is an acknowledgement and not a resource,
uses one JSON shape called Standard:
| Field | Type | Meaning |
|---|---|---|
result | "Success" or "Error" | Whether the request did what it asked. |
message | string | One sentence for a person. Its wording can change; do not parse it. |
details | any, or null | More about the answer. For a refusal with a known cause, an object with a reason. |
timestamp | string | When the engine answered, ISO 8601 in UTC. |
A refusal:
{
"result": "Error",
"message": "The runner cannot start as configured",
"details": {
"reason": "not_runnable",
"runner_id": "0d6c3f0e-5a55-4b0e-9a57-3f2a1b7c9e11",
"message": "No algorithms added to the runner."
},
"timestamp": "2026-03-02T09:17:02.330Z"
}An acknowledgement:
{
"result": "Success",
"message": "Simulation started",
"details": { "context": "e2a9f6b4-0c3d-4e7a-9f15-8b6d2a4c7e90" },
"timestamp": "2026-03-02T09:17:02.330Z"
}Rules for a client
- Decide on the HTTP status first, then on
details.reason. - Branch on
reason, never onmessage. - Not every refusal has a
reason. Where there is none,detailsholds context such asrunner_id,run_idor anerrorsentence, and the status code is what you act on. - Treat a
reasonyou do not know as a plain failure of its status code. New reasons can be added. - A few read routes answer a bad query with a short plain-text body instead
of the envelope:
GET /v1/assetandGET /v1/tickerwith400, andGET /v1/repositorywith500. Check theContent-Typebefore you parse. - A body the engine cannot parse at all, such as malformed JSON or a missing
required field, is refused with
400,415or422and a plain-text description, before any route logic runs.
Status codes
| Status | Meaning in this API |
|---|---|
200 | Done. The body is the resource, or a Success envelope. |
201 | Created: a runner, a data source, an algorithm instance, a download job, an uploaded plugin, a generated key. |
202 | Accepted, and the work continues in the background: a stop, a pause, a plugin build. Follow it on the realtime updates or by reading the resource. |
204 | Done, with no body: a deletion or an update. |
400 | The request is wrong as sent: a bad query value, a missing stop disposition, an unusable upload. Do not retry unchanged. |
401 | The token is missing or refused. See Tokens. |
403 | The token is fine, but the action is not allowed: a feature outside your plan, or a browser origin that is not allowed. |
404 | The thing named does not exist: a runner, a run, a plugin, a job. Also: a run still in progress has no record yet, and an engine that is not enrolled has no device. |
409 | The request conflicts with the current state: the runner is paused, running or not runnable, a plugin is in use, the lease cannot be used. Change the state, then retry. |
413 | An uploaded plugin package is too large. |
429 | A limit of your plan is reached, or the same action is already under way. |
500 | The engine failed. The details say what it was doing. |
501 | The engine is not set up for this action, for example no licensing service is configured. |
502, 503 | A service the engine depends on cannot be reached. This is never a statement about your plan. Retry later. |
Reason codes
The tables below list every stable value of details.reason.
Tokens
Sent before any route logic runs. See Authentication.
reason | Status | Meaning | Action |
|---|---|---|---|
missing_token | 401 | The request carries no token. | Send the Authorization header. |
not_bearer | 401 | The Authorization header is not a Bearer token. | Fix the header. |
malformed_token | 401 | The token is not a well-formed JSON Web Token. | Send the token unchanged. |
expired_token | 401 | The token has expired. | Obtain a fresh token and retry. |
invalid_signature | 401 | The signature does not verify. | Sign in again. |
unknown_key | 401 | The token is signed with a key the sign-in service does not publish. | Sign in again. |
wrong_algorithm | 401 | The token is signed with an algorithm the engine does not accept. | Sign in again. |
invalid_issuer | 401 | The token comes from another issuer. | Sign in with your Neurotrader account. |
wrong_token_use | 401 | The token is not an access token. | Send the access token, not the ID token. |
unknown_client | 401 | The token was issued to a client application the engine does not accept. | Sign in through an accepted client. |
invalid_token | 401 | The token is unacceptable for another reason. | Sign in again. |
anonymous_token | 401 | The token names no account. | Sign in again. |
key_source_unavailable | 503 | The engine cannot fetch the keys it verifies tokens with. | Retry later. |
origin_not_allowed | 403 | A websocket handshake came from a browser origin that is not on the engine's allow-list. | Connect from an allowed origin. |
Plan and quota
Sent when you create a runner or start or resume a run. details carries
the figures named in the table. See Plan limits.
reason | Status | Other details fields | Meaning |
|---|---|---|---|
feature_not_in_plan | 403 | feature | Your plan does not include the feature. For comparisons and instrument sweeps, feature is runs.multi. |
concurrent_runs_exhausted | 429 | limit, running | Your plan runs limit backtests at once, and running are in progress. Wait for one to end, or stop one. |
live_runners_exhausted | 429 | limit, running | Your plan allows limit live runs at once, and running are in progress. |
billing_session_in_flight | 429 | None | A plan change is already under way for this account. Wait for it to end. |
unknown_session | 404 | None | No plan change with this id is known to the engine. |
A paused run does not count toward concurrent_runs_exhausted.
A download that goes past your plan's data allowance does not fail the
request that started it. The months over the allowance are reported on the
download's topic, and the sentence ends with the code quota_exhausted in
parentheses. See Realtime updates.
Device and lease
Sent by the /v1/device routes, and by any request that needs the lease: a
run's start, a comparison's creation, a data download. See
Authentication.
reason | Status | Meaning | Action |
|---|---|---|---|
not_enrolled | 404 | This engine is not enrolled as a device of any account. | Enrol it: sign in to the app, or POST /v1/device. |
already_enrolled | 409 | This engine is already enrolled for your account. | Nothing. |
enrolled_elsewhere | 409 | This engine is enrolled for another account. | Sign in with that account, or have its owner release the device. |
lease_unusable | 409 | The stored lease cannot be verified or is past its last date. | Obtain a fresh one: POST /v1/device/lease. |
entitlement_unavailable | 503 | The licensing service cannot be reached. | Retry later. This is not a statement about your plan. |
entitlement_not_configured | 501 | This engine has no licensing service to enrol with. | Nothing to do from a client. |
key_store_unavailable | 503, 400 or 500 | The operating system's key store, where the device key lives, cannot be used. | Check that the key store is available, then retry. |
device_key_unusable | 500 | The device key cannot prove the enrolment. | Release the device and enrol again. |
enrolment_record_unreadable | 500 | The engine's record of its enrolment cannot be read. | Release the device and enrol again. |
A refusal made by the licensing service itself is passed through with the
status and the reason that service chose, and its own details one level
down, in details.details. The one you are most likely to meet is
seat_limit_reached (409): every seat of your plan is taken, and
details.details lists the account's devices so you can release one.
The legal consent routes pass through two reasons of that service:
unknown_legal_document (400) and legal_version_stale (409, with
current_version in details.details): the document was revised while the
consent screen was open, so show the new version and ask again.
Runner validation and sanity check
reason | Status | Sent by | Meaning |
|---|---|---|---|
not_runnable | 409 | POST /v1/runner/{simulation_id}/operate with start | The runner cannot run as it is set up. details.message names the cause. |
The engine checks a runner as a whole only when you ask it to run. One
reason code covers every cause, and details.message is the sentence to
show. Typical causes:
- The runner has no data source, or no algorithm.
- An algorithm reads a data source that is not on the runner.
- No data source is quoted in the primary quote asset, or the primary quote asset is not funded.
- A data source does not match the kind: a historical source on a live runner, or the reverse.
- The candle intervals of the data sources do not fit together.
- An algorithm's parameters are not valid, or its plugin is not loaded.
- An instrument sweep is no longer uniform: the instances differ in algorithm or parameters, share a data source, or use different intervals.
- A margin setting is out of order.
Other refusals of the runner routes have no reason code. Tell them apart by status and route:
| Status | Route and operation | Meaning |
|---|---|---|
409 | operate with start | The runner is paused. Resume the paused run, or stop it to discard it. |
409 | operate with pause | A live run cannot be paused, only stopped. |
404 | operate with stop or pause | The runner has no run in progress. |
404 | operate with resume | The runner has no paused run. |
409 | restore | The runner is running. |
409 | DELETE of a run | The run is still in progress. |
400 | Adding or removing a data source or an algorithm | The change was refused. details.error says why. |
400 | The result routes (performance, data, actions, account) | A query parameter is missing or wrong. details.expected shows the accepted form. |
404 | The result routes | The run, the algorithm instance or the instrument is not part of this run, or the run has not ended. |
A run that fails after it started is not an HTTP error. The start answered
200; the runner's status becomes error, and the run record's outcome
holds the message.
Plugins
Sent by the /v1/plugin routes. Here the envelope's details is an object
with reason and a nested details that holds the specifics, such as the
runs that use a plugin.
reason | Status | Meaning |
|---|---|---|
no_such_plugin | 404 | No plugin has this id. |
plugin_exists | 409 | A plugin with this name is already in the catalog. Upload with ?override=true to replace it, or remove it first. |
plugin_in_use | 409 | A run in progress uses one of the plugin's algorithms. The nested details list the runs. Stop them first. |
plugin_building | 409 | The plugin is being built. Wait for the build to end. |
algorithm_id_clash | 409 | The package publishes an algorithm id that is already registered. |
already_loaded | 409 | The plugin is already loaded. |
not_loaded | 409 | The plugin is not loaded. |
not_linked | 409 | Only a plugin linked from a project can be built. Upload a new package instead. |
not_loadable | 400 | The package or library is not a usable plugin. The nested details say why. |
unsupported_package | 400 | The file is not a native library for this platform. |
invalid_name | 400 | The library's name cannot be used as a plugin name. |
invalid_project_dir | 400 | The project directory is not an absolute path to an existing directory. |
not_a_rust_project | 400 | The directory is not a Rust project. |
bad_upload | 400 | The upload could not be read. Send multipart/form-data with the file in a part named package. |
package_too_large | 413 | The package is larger than the upload limit. |
catalog_unwritable | 500 | The engine could not write its plugin catalog. |
POST /v1/plugin/reload answers 200 and reports each plugin under
details.reloaded, details.skipped (with the reason plugin_building or
plugin_in_use) and details.failed.
Venues and live runs
reason | Status | Sent by | Meaning |
|---|---|---|---|
disposition_required | 400 | A stop of a live run, on either operate route | A live run has orders working. Say what to do with them: send {"operation": "stop", "disposition": "close"} to cancel them and close what the run opened, or "leave" to let them stand. |
live_runners_exhausted | 429 | A start of a live runner | Your plan's number of live runs is reached. See Plan and quota. |
not_runnable | 409 | A start of a live or venue runner | The setup cannot run. For a venue runner this includes a missing credential, a credential issued for another environment, a credential still waiting for its API key, and more than one algorithm instance. |
POST /v1/live/stop answers 400 when its body has no disposition, or
one that is not close or leave.
What a stop did to each order is not an error response. It arrives as the
stopped event on the runner's topic and is kept on the run record as
stop. A non-empty failed list there means the account's exposure is not
what you asked for: check the venue.
Run still running after a refused stop
When a stop is refused with disposition_required, nothing was stopped.
On a run that trades real funds, orders stay at the venue and the
algorithm keeps trading until a stop with a disposition is accepted.
Trouble a live run meets while it runs, such as a dropped connection or an
order the venue refused, is reported as condition events and in the
run's order record, not as HTTP errors. See
Realtime updates.
Realtime errors
The websocket has its own, smaller vocabulary: an error message with a
code of invalid_message, unknown_topic or lagged. See
Realtime updates.
Related
- Authentication
- Realtime updates
- Plan limits
- API reference: the status codes of each operation
- Run control
- Glossary