Skip to Content
NeurotraderDocs
Reference

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:

FieldTypeMeaning
result"Success" or "Error"Whether the request did what it asked.
messagestringOne sentence for a person. Its wording can change; do not parse it.
detailsany, or nullMore about the answer. For a refusal with a known cause, an object with a reason.
timestampstringWhen 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 on message.
  • Not every refusal has a reason. Where there is none, details holds context such as runner_id, run_id or an error sentence, and the status code is what you act on.
  • Treat a reason you 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/asset and GET /v1/ticker with 400, and GET /v1/repository with 500. Check the Content-Type before you parse.
  • A body the engine cannot parse at all, such as malformed JSON or a missing required field, is refused with 400, 415 or 422 and a plain-text description, before any route logic runs.

Status codes

StatusMeaning in this API
200Done. The body is the resource, or a Success envelope.
201Created: a runner, a data source, an algorithm instance, a download job, an uploaded plugin, a generated key.
202Accepted, 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.
204Done, with no body: a deletion or an update.
400The request is wrong as sent: a bad query value, a missing stop disposition, an unusable upload. Do not retry unchanged.
401The token is missing or refused. See Tokens.
403The token is fine, but the action is not allowed: a feature outside your plan, or a browser origin that is not allowed.
404The 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.
409The 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.
413An uploaded plugin package is too large.
429A limit of your plan is reached, or the same action is already under way.
500The engine failed. The details say what it was doing.
501The engine is not set up for this action, for example no licensing service is configured.
502, 503A 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.

reasonStatusMeaningAction
missing_token401The request carries no token.Send the Authorization header.
not_bearer401The Authorization header is not a Bearer token.Fix the header.
malformed_token401The token is not a well-formed JSON Web Token.Send the token unchanged.
expired_token401The token has expired.Obtain a fresh token and retry.
invalid_signature401The signature does not verify.Sign in again.
unknown_key401The token is signed with a key the sign-in service does not publish.Sign in again.
wrong_algorithm401The token is signed with an algorithm the engine does not accept.Sign in again.
invalid_issuer401The token comes from another issuer.Sign in with your Neurotrader account.
wrong_token_use401The token is not an access token.Send the access token, not the ID token.
unknown_client401The token was issued to a client application the engine does not accept.Sign in through an accepted client.
invalid_token401The token is unacceptable for another reason.Sign in again.
anonymous_token401The token names no account.Sign in again.
key_source_unavailable503The engine cannot fetch the keys it verifies tokens with.Retry later.
origin_not_allowed403A 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.

reasonStatusOther details fieldsMeaning
feature_not_in_plan403featureYour plan does not include the feature. For comparisons and instrument sweeps, feature is runs.multi.
concurrent_runs_exhausted429limit, runningYour plan runs limit backtests at once, and running are in progress. Wait for one to end, or stop one.
live_runners_exhausted429limit, runningYour plan allows limit live runs at once, and running are in progress.
billing_session_in_flight429NoneA plan change is already under way for this account. Wait for it to end.
unknown_session404NoneNo 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.

reasonStatusMeaningAction
not_enrolled404This engine is not enrolled as a device of any account.Enrol it: sign in to the app, or POST /v1/device.
already_enrolled409This engine is already enrolled for your account.Nothing.
enrolled_elsewhere409This engine is enrolled for another account.Sign in with that account, or have its owner release the device.
lease_unusable409The stored lease cannot be verified or is past its last date.Obtain a fresh one: POST /v1/device/lease.
entitlement_unavailable503The licensing service cannot be reached.Retry later. This is not a statement about your plan.
entitlement_not_configured501This engine has no licensing service to enrol with.Nothing to do from a client.
key_store_unavailable503, 400 or 500The operating system's key store, where the device key lives, cannot be used.Check that the key store is available, then retry.
device_key_unusable500The device key cannot prove the enrolment.Release the device and enrol again.
enrolment_record_unreadable500The 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

reasonStatusSent byMeaning
not_runnable409POST /v1/runner/{simulation_id}/operate with startThe 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:

StatusRoute and operationMeaning
409operate with startThe runner is paused. Resume the paused run, or stop it to discard it.
409operate with pauseA live run cannot be paused, only stopped.
404operate with stop or pauseThe runner has no run in progress.
404operate with resumeThe runner has no paused run.
409restoreThe runner is running.
409DELETE of a runThe run is still in progress.
400Adding or removing a data source or an algorithmThe change was refused. details.error says why.
400The result routes (performance, data, actions, account)A query parameter is missing or wrong. details.expected shows the accepted form.
404The result routesThe 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.

reasonStatusMeaning
no_such_plugin404No plugin has this id.
plugin_exists409A plugin with this name is already in the catalog. Upload with ?override=true to replace it, or remove it first.
plugin_in_use409A run in progress uses one of the plugin's algorithms. The nested details list the runs. Stop them first.
plugin_building409The plugin is being built. Wait for the build to end.
algorithm_id_clash409The package publishes an algorithm id that is already registered.
already_loaded409The plugin is already loaded.
not_loaded409The plugin is not loaded.
not_linked409Only a plugin linked from a project can be built. Upload a new package instead.
not_loadable400The package or library is not a usable plugin. The nested details say why.
unsupported_package400The file is not a native library for this platform.
invalid_name400The library's name cannot be used as a plugin name.
invalid_project_dir400The project directory is not an absolute path to an existing directory.
not_a_rust_project400The directory is not a Rust project.
bad_upload400The upload could not be read. Send multipart/form-data with the file in a part named package.
package_too_large413The package is larger than the upload limit.
catalog_unwritable500The 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

reasonStatusSent byMeaning
disposition_required400A stop of a live run, on either operate routeA 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_exhausted429A start of a live runnerYour plan's number of live runs is reached. See Plan and quota.
not_runnable409A start of a live or venue runnerThe 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.

On this page