For the complete documentation index, see llms.txt. This page is also available as Markdown.

GET /orders/{order_id}

Get order by ID

Get order by ID.

operationId: fetchOrder · CCXT method: fetchOrder

Authentication: hmacAuth.

Resolves any order the account placed: resting orders come from the matching engine's authoritative book state, and recently completed orders (filled, cancelled, rejected, expired) are served from the indexer's terminal-order mirror, so an order that fills instantly can still be fetched by the id its placement returned (ENG-10962). The mirror retains the most recent 500 terminal orders per account — the same window GET /orders/history lists — so anything listable is fetchable. Older terminal orders resolve only through GET /orders/history.

Parameters

Name
In
Type
Required
Default
Description

order_id

path

string

Yes

market_id

query

string

Yes

Market the order rests on (required for routing).

Responses

Status
Body
Meaning

200

Order

The requested order.

401

(no schema declared)

404

(no schema declared)

No such order for this account: the id was never placed by this account, or it refers to a terminal order older than the 500-per-account retention window. A 404 is deliberately identical for "never existed" and "not yours" (ownership masking). It no longer means "not currently resting" — recently terminal orders return 200 (ENG-10962).

Example

curl -X GET 'https://exchange.nexus.xyz/api/exchange/orders/{order_id}' \
  -H 'X-API-Key: nx_7f3a1b...' \
  -H 'X-Timestamp: 1776033911836' \
  -H 'X-Signature: <hmac-sha256>'
import requests

headers = {
    "X-API-Key": "nx_7f3a1b...",
    "X-Timestamp": "1776033911836",
    "X-Signature": "<hmac-sha256>"
}

response = requests.get("https://exchange.nexus.xyz/api/exchange/orders/{order_id}", headers=headers)
response.raise_for_status()
print(response.json())
const response = await fetch("https://exchange.nexus.xyz/api/exchange/orders/{order_id}", {
  method: "GET",
  headers: {
    "X-API-Key": "nx_7f3a1b...",
    "X-Timestamp": "1776033911836",
    "X-Signature": "<hmac-sha256>"
  },
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log(await response.json());

X-Signature is a placeholder: it is derived from this specific request. See Authentication for the canonical string and the HMAC rule.


Generated from eng/apps/exchange/api/openapi.json (spec 0.9.36). Do not edit by hand — regenerate with python3 product/docs/tools/api-reference/generate.py. Hand-authored context lives in the Guides pages.

Last updated