For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/institutional/exchange-rest.md.

Exchange REST

Overview

This API allows clients to interact with the CeFi trading platform for order management, market data retrieval, and account information.

Base URLs

EnvironmentBase URL
Productionhttps://api.truex.co/v1/cefi/
UAT (sandbox)https://api.uat.truex.co/v1/cefi/

REST is reachable over the internet. Access is restricted by the location of the IP address your requests come from.

Breaking in v1.0.6. The legacy /api/v1/ path prefix is removed — every operation is now served only under /v1/cefi/ (admin operations under /admin/v1/cefi/). Response formats are unchanged: this release is a path move only, so updating your base path is sufficient.

Breaking in v1.0.10 — v2024_01_01 is removed. v2026_01_23 is the only supported schema version and the default, so a request that sends no X-Truex-Version header receives the envelope response format described under API Versioning below, with paginated list reads and error bodies wrapped in { "error": ... }. A request that sends X-Truex-Version: v2024_01_01, or any other version this API does not serve, is rejected with 400 Bad Request.

Authentication

Protected endpoints take a JWT bearer token minted from your ES256 API key, sent in the Authorization header.

Market data and service-health endpoints are public and require no authentication.

JWT bearer token

Create an ES256 (EC P-256) API key at app.truemarkets.co, under Settings, API keys. Mint a token pair by signing the challenge {key_id}.{timestamp} with the private key and posting it to POST /v1/auth/api-key/token on https://api.truemarkets.co (see the Auth API). The signature is the raw 64-byte r || s, base64url-encoded without padding. Access tokens last one hour; refresh them at POST /v1/auth/token/refresh.

Send on every request:

  • Authorization: Bearer <access token>
  • x-truex-auth-timestamp: the current time in Unix seconds, no more than 15 seconds old and no more than 1 second in the future. It guards against replayed requests.

The token carries a client_id claim, which scopes every request to your CeFi client. A JWT without a client_id claim (an account not enabled for CeFi trading) is rejected with 401 Unauthorized.

API Versioning

The API uses date-based versioning via the X-Truex-Version header. To request a specific API version, include the header in your request:

X-Truex-Version: v2026_01_23

Supported Versions:

VersionStatusDescription
v2026_01_23Current (Default)Envelope format - responses wrapped in { "data": [...], "pagination": {...} }
v2026_11_03PreviewSame envelope format. Currently answers exactly as v2026_01_23; breaking changes land here first and are listed in the Change Log.

If no version header is provided, the API defaults to v2026_01_23; the response's X-Truex-Version header names the version that answered. A version this API does not serve, including the withdrawn v2024_01_01, is rejected with 400 Bad Request. Use the /v1/cefi/versions endpoint to discover supported versions programmatically.

Response Format: { "data": [...], "pagination": { "size": 10, "next_cursor": "..." } }

Error Response Format: { "error": { ...RFC 7807 Problem Details... } }

Deprecation Policy: When a version is deprecated, responses will include RFC 8594 headers:

  • Deprecation: Date when the version was deprecated
  • Sunset: Date when the version will be removed

Deprecation is a warning, not a grace period that can be extended: once a version passes its removal date it is withdrawn, and requests that ask for it are rejected rather than served in an older format.

Service

Assets

Instruments

Market Data

Clients

Orders

Balances

Transfers

Operations

Was this page helpful?YesNo