Client identifier.
- CeFi
- REST
TrueX REST API (v1.0.3)
This API allows clients to interact with the TrueX trading platform for order management, market data retrieval, and account information.
Certain API requests must be authenticated using HMAC-SHA256 signature authentication.
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: v2024_01_01Supported Versions:
| Version | Status | Description |
|---|---|---|
v2024_01_01 | Current (Default) | Original API format - responses return raw data arrays/objects |
v2026_01_23 | Current | New envelope format - responses wrapped in { "data": [...], "pagination": {...} } |
If no version header is provided, the API defaults to v2024_01_01. Use the /api/v1/versions endpoint to discover supported versions programmatically.
Response Format by Version:
- v2024_01_01:
[{...}, {...}](raw array) or{...}(raw object) - v2026_01_23:
{ "data": [...], "pagination": { "limit": 10, "next_cursor": "..." } }
Error Response Format by Version:
- v2024_01_01: RFC 7807 Problem Details format
- v2026_01_23:
{ "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
- 📖 Full API Documentation: https://docs.truex.co/
- 📧 Support: support@truex.co
https://docs.truemarkets.co/_mock/apis/cefi/rest/v1/
https://prod.truex.co/
Order modify request context.
The internal order ID of the order to be modified. This is the id that was set by TrueX and should be a purely numeric string.
The external ID for the order to be modified set by the client. Must be in one the follower formats:
- UUID version 4 in its human readable form, with hypens, and in lowercase.
- ASCII character string of up to 18 characters containing only the unreserved URL characters: letters (a–z, A–Z), digits (0–9), hyphen (-), underscore (_), period (.), and tilde (~).
The client ID the modification will be entered on behalf of.
The new amount of base asset the order is requesting to tranasct.
The new highest or lowest price the order will buy or sell, respectively, at. Only required for LIMIT orders.
- Mock server
https://docs.truemarkets.co/_mock/apis/cefi/rest/v1/api/v1/order
https://prod.truex.co/api/v1/order
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
https://docs.truemarkets.co/_mock/apis/cefi/rest/v1/api/v1/order \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-truex-auth-signature: string' \
-H 'x-truex-auth-timestamp: string' \
-H 'x-truex-auth-token: string' \
-H 'x-truex-auth-userid: string' \
-d '{
"id": "1159718398822187014",
"external_id": "123e7654-e89b-42d4-a456-426614174000",
"info": {
"msg_id": "0",
"parent_id": "0",
"client_id": "0",
"prev_modify": "0",
"new_qty": "0",
"new_price": "0",
"new_type": "MARKET"
}
}'Successful operation.
The current status of the order.
- INITIALIZED Order has been created, but not sent yet.
- NEW_PENDING Order has been sent, but not confirmed by the exchange or downstream process.
- REJECTED An order setting or market condition prevents the order from getting processed.
- ACTIVE The order was accepted by the system and open to trading (order and market conditions permitting).
- FILLED The entire order traded.
- CANCEL_PENDING Indicates a cancel request was received and being processed.
- CANCELED The order was canceled from a cancel request, order conditions, or market conditions.
- MODIFY_PENDING Indicates a modification request was received and being processed.
A unique identifier created by the client. Must be in one the follower formats:
- UUID version 4 in its human readable form, with hypens, and in lowercase.
- ASCII character string of up to 18 characters containing only the unreserved URL characters: letters (a–z, A–Z), digits (0–9), hyphen (-), underscore (_), period (.), and tilde (~).
A unique identifier created by the client. Must be in one the follower formats:
- UUID version 4 in its human readable form, with hypens, and in lowercase.
- ASCII character string of up to 18 characters containing only the unreserved URL characters: letters (a–z, A–Z), digits (0–9), hyphen (-), underscore (_), period (.), and tilde (~).
Order quantity that has been acknowledge by the exchange but is not yet trading.
{ "id": "799477895858487977", "status": "ACTIVE", "order_info": { "msg_id": "799477895858487977", "parent_id": "432351810263056385", "client_id": "78901949710204932", "instrument_id": "78901949723181070", "qty": "0.00145", "price": "111067", "flags": [ … ], "side": "BUY", "type": "LIMIT", "tif": "GTC", "exec_inst_flags": [ … ], "hold_fee_rate": "0.002", "stp": "NONE" }, "modify_info": { "msg_id": "0", "parent_id": "0", "client_id": "0", "prev_modify": "0", "new_qty": "0", "new_price": "0", "new_type": "MARKET" }, "external_id": "EXT-ORDER-123", "ref_external_id": "REF-EXT-ORDER-123", "pending_qty": "0", "leaves_qty": "0.00145", "exeuted_qty": "0.00239", "executed_vwap": "111050.5" }
Request
DEPRECATED: Use /api/v1/orders/{ref_id} instead. Begins the cancellation process of an existing active order from the exchange. N.B. it is still possible to recieve trades on the order that is being canceled. ref_id must be one of the following:
The exchange assigned order ID.
UUID version 4 in its human readable form, with hypens, and in lowercase.
ASCII RFC 3986 compliant character string that does not exceed 18 characters.
- Acceptable characters are
a-z,A-Z,0-9,-,_,.,~
- Acceptable characters are
- Mock server
https://docs.truemarkets.co/_mock/apis/cefi/rest/v1/api/v1/order/{ref_id}
https://prod.truex.co/api/v1/order/{ref_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://docs.truemarkets.co/_mock/apis/cefi/rest/v1/api/v1/order/{ref_id}?id_type=client' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-truex-auth-signature: string' \
-H 'x-truex-auth-timestamp: string' \
-H 'x-truex-auth-token: string' \
-H 'x-truex-auth-userid: string'Successful operation.
The current status of the order.
- INITIALIZED Order has been created, but not sent yet.
- NEW_PENDING Order has been sent, but not confirmed by the exchange or downstream process.
- REJECTED An order setting or market condition prevents the order from getting processed.
- ACTIVE The order was accepted by the system and open to trading (order and market conditions permitting).
- FILLED The entire order traded.
- CANCEL_PENDING Indicates a cancel request was received and being processed.
- CANCELED The order was canceled from a cancel request, order conditions, or market conditions.
- MODIFY_PENDING Indicates a modification request was received and being processed.
A unique identifier created by the client. Must be in one the follower formats:
- UUID version 4 in its human readable form, with hypens, and in lowercase.
- ASCII character string of up to 18 characters containing only the unreserved URL characters: letters (a–z, A–Z), digits (0–9), hyphen (-), underscore (_), period (.), and tilde (~).
A unique identifier created by the client. Must be in one the follower formats:
- UUID version 4 in its human readable form, with hypens, and in lowercase.
- ASCII character string of up to 18 characters containing only the unreserved URL characters: letters (a–z, A–Z), digits (0–9), hyphen (-), underscore (_), period (.), and tilde (~).
Order quantity that has been acknowledge by the exchange but is not yet trading.
{ "id": "799477895858487977", "status": "ACTIVE", "order_info": { "msg_id": "799477895858487977", "parent_id": "432351810263056385", "client_id": "78901949710204932", "instrument_id": "78901949723181070", "qty": "0.00145", "price": "111067", "flags": [ … ], "side": "BUY", "type": "LIMIT", "tif": "GTC", "exec_inst_flags": [ … ], "hold_fee_rate": "0.002", "stp": "NONE" }, "modify_info": { "msg_id": "0", "parent_id": "0", "client_id": "0", "prev_modify": "0", "new_qty": "0", "new_price": "0", "new_type": "MARKET" }, "external_id": "EXT-ORDER-123", "ref_external_id": "REF-EXT-ORDER-123", "pending_qty": "0", "leaves_qty": "0.00145", "exeuted_qty": "0.00239", "executed_vwap": "111050.5" }