API documentation

Server

Server utilities and health

Base URL https://api.lexx-trade.com/api/v2 · All endpoints require Ed25519 request signatures unless marked "no auth" — see Authentication.

GET /server/time no auth

Get server time

Returns current server timestamp for clock synchronization (required for Ed25519 signing).

Request samples

curl 'https://api.lexx-trade.com/api/v2/server/time'
// Public endpoint — plain fetch works too
const { data, meta } = await lexx("GET", "/server/time");
console.log(data);
# Public endpoint — no signature required
res = lexx("GET", "/server/time")
print(res["data"])

Response 200 — Server time

data object

Current server time for Ed25519 signature synchronization

serverTime integer (int64) required

Current server time as a Unix timestamp in milliseconds. Use this to compute the X-LEXX-TIMESTAMP header.

timezone string required

Server timezone (always "UTC")

meta object

Standard response envelope metadata included in every successful API response. Rate-limit state is NOT in the body — it is delivered via the X-RateLimit-* response headers.

requestId string (uuid) required

Unique identifier for this API request, useful for support tickets and debugging

timestamp integer required

Response timestamp in Unix milliseconds

version string required

API version

idempotencyKey string

Echoed back on a successful mutating request (POST/DELETE) when the caller sent an X-Idempotency-Key header. Absent otherwise.

Error responses (429, 500)
429 Rate limit exceeded
500 Internal server error

All errors share the { error: { code, status, message }, meta } envelope — see Errors for every code.

GET /server/status no auth

Get API status

Returns API health and exchange connectivity status.

Request samples

curl 'https://api.lexx-trade.com/api/v2/server/status'
// Public endpoint — plain fetch works too
const { data, meta } = await lexx("GET", "/server/status");
console.log(data);
# Public endpoint — no signature required
res = lexx("GET", "/server/status")
print(res["data"])

Response 200 — Service status

data object

API status

status string required

Overall API health (currently a constant "operational")

apiVersion string

API version string

timestamp integer (int64)

Server time (Unix ms) when the status was generated

meta object

Standard response envelope metadata included in every successful API response. Rate-limit state is NOT in the body — it is delivered via the X-RateLimit-* response headers.

requestId string (uuid) required

Unique identifier for this API request, useful for support tickets and debugging

timestamp integer required

Response timestamp in Unix milliseconds

version string required

API version

idempotencyKey string

Echoed back on a successful mutating request (POST/DELETE) when the caller sent an X-Idempotency-Key header. Absent otherwise.

Error responses (429, 500)
429 Rate limit exceeded
500 Internal server error

All errors share the { error: { code, status, message }, meta } envelope — see Errors for every code.

GET /server/version no auth

Get build/version info

Returns service name, API version, Node runtime, and uptime. Unauthenticated, like the other /server/* endpoints.

Request samples

curl 'https://api.lexx-trade.com/api/v2/server/version'
// Public endpoint — plain fetch works too
const { data, meta } = await lexx("GET", "/server/version");
console.log(data);
# Public endpoint — no signature required
res = lexx("GET", "/server/version")
print(res["data"])

Response 200 — Version info

data object
service string required
apiVersion string required
node string required

Node.js runtime version.

startedAt integer (int64) required

Process start time, Unix milliseconds.

uptimeSec integer required

Seconds since process start.

meta object

Standard response envelope metadata included in every successful API response. Rate-limit state is NOT in the body — it is delivered via the X-RateLimit-* response headers.

requestId string (uuid) required

Unique identifier for this API request, useful for support tickets and debugging

timestamp integer required

Response timestamp in Unix milliseconds

version string required

API version

idempotencyKey string

Echoed back on a successful mutating request (POST/DELETE) when the caller sent an X-Idempotency-Key header. Absent otherwise.

Error responses (429, 500)
429 Rate limit exceeded
500 Internal server error

All errors share the { error: { code, status, message }, meta } envelope — see Errors for every code.

GET /ping

Authenticated health check

Authenticated liveness probe. Unlike the other endpoints, this one returns the legacy response envelope ({ status: "success", data: { message, timestamp } }), not the v2 { data, meta } envelope. Requires a valid signed request.

Request samples

# Sign: timestamp + "GET" + "/v2/ping" + ""  → see Authentication
curl -X GET 'https://api.lexx-trade.com/api/v2/ping' \
  -H "X-LEXX-KEY: $LEXX_PUBLIC_KEY" \
  -H "X-LEXX-SIGN: $SIGNATURE" \
  -H "X-LEXX-TIMESTAMP: $TIMESTAMP"
// lexx() — the signing helper from the Quickstart guide
const { data, meta } = await lexx("GET", "/ping");
console.log(data);
# lexx() — the signing helper from the Quickstart guide
res = lexx("GET", "/ping")
print(res["data"])

Response 200 — Pong.

status string
data object
message string
timestamp integer (int64)

Server time (Unix ms).

Error responses (401, 429, 500)
401 Invalid or missing API key/signature
429 Rate limit exceeded
500 Internal server error

All errors share the { error: { code, status, message }, meta } envelope — see Errors for every code.

Cookie Preferences

Manage your cookie preferences below. Necessary cookies are always active as they are essential for the website to function properly.

Strictly Necessary

Essential for the website to function. These cookies cannot be disabled.

Analytics

Help us understand how visitors interact with our website by collecting and reporting information anonymously.

Marketing

Used to track visitors across websites to display relevant advertisements.

Preferences

Allow the website to remember choices you make, such as language or region.