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

POST /api/v1/orders/preview

Preview an order

Preview an order.

operationId: previewOrderV1 · Rate-limit class: trading

Declared server differs from the callable one. This path declares its own servers base of https://exchange.nexus.xyz, without the /api/exchange mount the document default carries. Measured 2026-09-02, the override is not routedhttps://exchange.nexus.xyz/api/v1/orders/preview returns 404 while the gateway form in the sample below is routed. A client generated from this contract will aim at the override; pin the gateway base until the per-network hosts are live. See Networks.

Not reachable through CCXT. Pre-trade simulation. CCXT has no unified preview/dry-run method.

Authentication: hmacAuth.

Pre-trade preview: projects the margin/equity/fee impact of an order without submitting it.

Request body

Required. OrderRequestapplication/json.

Responses

Status
Body
Meaning

200

PreviewResponse

Projected pre-trade impact.

400

(no schema declared)

Validation error

401

(no schema declared)

429

(no schema declared)

Example

curl -X POST 'https://exchange.nexus.xyz/api/exchange/api/v1/orders/preview' \
  -H 'X-API-Key: nx_7f3a1b...' \
  -H 'X-Timestamp: 1776033911836' \
  -H 'X-Signature: <hmac-sha256>' \
  -H 'Content-Type: application/json'
import requests

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

response = requests.post("https://exchange.nexus.xyz/api/exchange/api/v1/orders/preview", headers=headers)
response.raise_for_status()
print(response.json())
const response = await fetch("https://exchange.nexus.xyz/api/exchange/api/v1/orders/preview", {
  method: "POST",
  headers: {
    "X-API-Key": "nx_7f3a1b...",
    "X-Timestamp": "1776033911836",
    "X-Signature": "<hmac-sha256>",
    "Content-Type": "application/json"
  },
});
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