Skip to main content

Base URLs

TL;DREngine REST and WebSocket endpoints are served from the same RA-TLS origin. The Darknyx engine terminates TLS itself with a boot-random, attestation-bound key; the dstack s-suffix route passes that TLS stream through without terminating it. Use the HTTPS origin for engine REST and swap the scheme to wss:// for the shared stream. Static /evidences/* files are served separately by dstack infrastructure and are supporting artifacts, not proof of the live engine socket.

The RA-TLS origin

The public hostname routes raw TLS to port 8443 inside the Darknyx CVM. Its certificate is self-signed by design: clients authenticate its public key with GET /transport-attestation, not with a public certificate authority. A single verified origin serves the engine API:
  • REST paths are mounted at the root (/auth/token, /orders, /instruments, …).
  • The sole WebSocket path is /v1/stream; connect with the wss:// scheme and authenticate in-band with op: login.
The exact host and approved measurement are published with the reviewed release. The s suffix selects TLS passthrough; omitting it reaches a different gateway-terminated transport and is not equivalent. Verify the connection before authentication as described in Transport & Attestation.

Common headers

The /v1/stream WebSocket upgrades without credentials; authenticate afterward with an in-band login frame so bearer tokens never appear in URLs.

Response conventions

REST handlers return JSON. A successful read returns the resource directly; a successful write returns a small result object (for example, a placed order returns { "order_id", "status", "arrival_slot" }). Errors return an HTTP status code plus a structured JSON { "code": <number>, "message": <string> } body. Every REST response also carries x-request-id for support correlation. See Error Codes for the full catalogue of conditions per status.

Health

A liveness probe. Returns 200 with the process uptime when the engine is up. Use it for load-balancer health checks; use /system/status for a richer, trading-relevant readiness signal (is matching running, is settlement wired).

Server time

Returns the venue’s current Solana slot and wall-clock time. Use it to convert a wall-clock “good-till-time” into an expiry_slot without running your own RPC, and for clock-skew diagnostics.
Order expiry is slot-basedDarknyx orders expire at a Solana slot, not a wall-clock timestamp. To place a “good for the next ten minutes” order, read /time, project the wall-clock target onto a slot using the current slot as the anchor (Solana targets roughly 400 ms per slot), and pass that as expiry_slot. The SDK does this conversion for you. See Time in Force.