Skip to main content

API Error Codes

API Error Codes cover This page is the complete reference for errors returned by Ekiden’s trading API. It covers both gateway responses and matching-engine rejections for placing, amending, and cancelling orders.
For the general error-response envelope, authentication requirements, and rate-limit conventions, see API conventions.

How an error is returned

Gateway failures use an HTTP status code and an error payload. Matching-engine rejections are normally returned with HTTP 400; the payload contains the applicable RejectReason code.
If an order is rejected without a more specific matching-engine reason, the gateway may return OrderRejected. Batch operations can return HTTP 202 Accepted while the final result is pending; use the relevant order or execution endpoint to retrieve the outcome.

Gateway API errors

Matching-engine rejection codes

The codes below are returned as RejectReason values. A code can apply to more than one endpoint; the operation group shows where it is expected to occur, not an exclusive mapping.

Place order

Amend or cancel-replace order

Cancel order

Shared and generic codes

Integration guidance

  1. Use the HTTP status to determine whether to retry, re-authenticate, or correct the request.
  2. For HTTP 400 order rejections, branch on the returned RejectReason rather than parsing the human-readable message.
  3. Do not retry validation, risk, precision, or order-state rejections unchanged. Correct the request first.
  4. Back off and retry only transient errors such as 429, 503, or 500; respect any rate-limit headers and use exponential backoff with jitter.
  5. For 202 Accepted batch results, wait for the final status through the appropriate order or execution query rather than treating acceptance as execution.
Do not assume that a code is exclusive to one endpoint. The matching engine may return an applicable shared rejection code for any order lifecycle operation.