For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/institutional/true-markets-cefi-rest.md.
CeFi direct REST
Overview
This API allows clients to interact with the CeFi trading platform for order management, market data retrieval, and account information.
Base URLs
| Environment | Base URL |
|---|---|
| Production | https://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_01is removed.v2026_01_23is the only supported schema version and the default, so a request that sends noX-Truex-Versionheader receives the envelope response format described under API Versioning below, with paginated list reads and error bodies wrapped in{ "error": ... }. A request that sendsX-Truex-Version: v2024_01_01, or any other version this API does not serve, is rejected with400 Bad Request.
Authentication
Protected endpoints accept either of two authentication methods:
- JWT bearer token — mint a JWT from your ES256 API key and send it in the
Authorizationheader. This is the recommended method. - HMAC-SHA256 signed requests using a legacy HMAC API key and secret. HMAC keys keep working while they are phased out.
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, so you don't send x-truex-auth-userid. A JWT without a client_id claim (an account not enabled for CeFi trading) is rejected with 401 Unauthorized.
HMAC-SHA256 (legacy)
Send x-truex-auth-token (your API key), x-truex-auth-timestamp, x-truex-auth-signature and x-truex-auth-userid (the client the request acts for). Compute the signature as:
signature = base64( HMAC_SHA256( secret, TIMESTAMP + METHOD + PATH + BODY ) )where PATH includes the raw query string exactly as sent (? and all, omitted when the query is empty) and BODY is the exact serialized request body (empty string when there is none). Signatures over the path alone are still accepted while signers move over. The HMAC security scheme below has the full rules and an example.
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_23Supported Versions:
| Version | Status | Description |
|---|---|---|
v2026_01_23 | Current (Default) | Envelope format - responses wrapped in { "data": [...], "pagination": {...} } |
v2026_11_03 | Preview | Same 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 deprecatedSunset: 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.
Links
- 📖 Full API Documentation: https://docs.truemarkets.co/
- 📧 Support: [email protected]
Service
- Get service health:
GET /v1/cefi/health - Get supported API versions:
GET /v1/cefi/versions
Assets
- Get assets:
GET /v1/cefi/assets
Instruments
- Get instruments:
GET /v1/cefi/instruments
Market Data
- Get markets:
GET /v1/cefi/market/quote - Get auction state and indicative:
GET /v1/cefi/market/auction - Compute market quote:
POST /v1/cefi/markets/quote
Clients
- Get clients:
GET /v1/cefi/clients - Update settings:
PATCH /v1/cefi/clients - Get client fees:
GET /v1/cefi/clients/fees
Orders
- Get orders:
GET /v1/cefi/orders - Create order:
POST /v1/cefi/orders - Modify order:
PATCH /v1/cefi/orders - Cancel order:
DELETE /v1/cefi/orders/{ref_id} - Cancel all orders:
DELETE /v1/cefi/orders/all - Active orders:
GET /v1/cefi/orders/active - All order trades:
GET /v1/cefi/orders/trade - All order activity:
GET /v1/cefi/orders/activity - Status order:
GET /v1/cefi/orders/status/{ref_id}
Balances
- Get balance:
GET /v1/cefi/balances - Get balance activity:
GET /v1/cefi/balances/activity
Transfers
- Get transfer:
GET /v1/cefi/transfers - Initiate transfer:
POST /v1/cefi/transfers - Get Active transfers:
GET /v1/cefi/transfers/active
Operations
- Get service health:
GET /v1/cefi/health - Get supported API versions:
GET /v1/cefi/versions - Get assets:
GET /v1/cefi/assets - Get instruments:
GET /v1/cefi/instruments - Get markets:
GET /v1/cefi/market/quote - Get auction state and indicative:
GET /v1/cefi/market/auction - Compute market quote:
POST /v1/cefi/markets/quote - Get clients:
GET /v1/cefi/clients - Update settings:
PATCH /v1/cefi/clients - Get client fees:
GET /v1/cefi/clients/fees - Get orders:
GET /v1/cefi/orders - Create order:
POST /v1/cefi/orders - Modify order:
PATCH /v1/cefi/orders - Cancel order:
DELETE /v1/cefi/orders/{ref_id} - Cancel all orders:
DELETE /v1/cefi/orders/all - Active orders:
GET /v1/cefi/orders/active - All order trades:
GET /v1/cefi/orders/trade - All order activity:
GET /v1/cefi/orders/activity - Status order:
GET /v1/cefi/orders/status/{ref_id} - Get balance:
GET /v1/cefi/balances - Get balance activity:
GET /v1/cefi/balances/activity - Get transfer:
GET /v1/cefi/transfers - Initiate transfer:
POST /v1/cefi/transfers - Get Active transfers:
GET /v1/cefi/transfers/active
- Need help? [email protected]
- Chat with us on Discord
- See what changed in the changelog
List open positions GET
Returns a read-only list of the authenticated user's open positions. Data is fetched on demand from the venue; nothing is persisted.
Get service health GET
Returns the current readiness status for the REST API Gateway. The response includes a human-readable status indicator, the service name, and the timestamp when the status was generated.