Skip to content

Overview

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

Base URL

https://prod.truex.co/api/v1/

Authentication

Certain API requests must be authenticated using HMAC-SHA256 signature authentication.

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: v2024_01_01

Supported Versions:

VersionStatusDescription
v2024_01_01Current (Default)Original API format - responses return raw data arrays/objects
v2026_01_23CurrentNew 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": { "size": 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 deprecated
  • Sunset: Date when the version will be removed
Download OpenAPI description
Languages
Servers
Mock server

https://docs.truemarkets.co/_mock/apis/cefi-direct/rest/v1/

https://prod.truex.co/

Service

Health checks and API version discovery endpoints. These endpoints are publicly accessible and do not require authentication.

Operations

Assets

Query available assets on the exchange by ID or name.

Operations

Instruments

Query tradeable instruments (market definitions) and their statistics.

Operations

Market Data

Real-time market quotes and VWAP computations. These endpoints are publicly accessible and do not require authentication.

Operations

Clients

Retrieve and update client account information and settings.

Operations

Orders

Create, modify, cancel, and query orders including status, trades, and activity history.

Operations

Request

Create a new order for a specific instrument.

Security
HMAC
Headers
x-truex-auth-useridstringrequired

Client identifier.

x-truex-auth-timestampstringrequired

Timestamp when request was made in seconds since epoch. Must be no older than 15 seconds and no more than 1 second in the future.

x-truex-auth-tokenstringrequired

The UUID affiliated with the HMAC key.

x-truex-auth-signaturestringrequired

The computed HMAC signature.

Bodyapplication/jsonrequired

Order new request context.

external_idstring

A unique identifier created by the client. Must be in one of the following 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 (~).
Example: "321e7654-e89b-42d4-a456-426614174000"
infoobject(OrderInfo)required
info.​msg_idstring^[1-9][0-9]*$

ID of last message to act upon the order.

Example: "799477895858487977"
info.​parent_idstring^[1-9][0-9]*$

ID of the application creating the order, may be zero.

Example: "432351810263056385"
info.​client_idstring^[1-9][0-9]*$required

The client ID the order will be entered on behalf of.

Example: "78901949710204932"
info.​instrument_idstring^[1-9][0-9]*$required

The ID of the instrument the order will transact in.

Example: "78901949723181070"
info.​qtystringrequired

The amount of base asset the order is requesting to tranasct.

Example: "0.00145"
info.​pricestringrequired

The highest or lowest price the order will buy or sell, respectively, at. Only required for LIMIT orders.

Example: "111067"
info.​flagsArray of stringsunique

General order flags that can be combined and used together.

  • USE_AGGRESIVE_PRICING Applicable to market orders only. When enabled, the exchange calculates a price for the market order that is more aggressive than the current best bid or offer. This is useful when prioritizing liquidity capture over minimizing price slippage.
Items Value"USE_AGGRESSIVE_PRICING"
Example: ["USE_AGGRESSIVE_PRICING"]
info.​sidestringrequired

Side of order, can be BUY or SELL

  • BUY Provide trader's quote asset to acquire the base asset.
  • SELL Provide trader's base asset to acquire the quote asset.
Enum"BUY""SELL"
Example: "BUY"
info.​typestringrequired

Type of order, can be LIMIT, MARKET.

  • LIMIT A specified limit price sets the maximum amount in quote currency units that the order will exchange to acquire the base currency.
  • MARKET The order uses the CeFi exchange market price at time of order entry plus/minus (for buy/sell respectively) the max price allowed by the price band risk limits for the instrument.
Enum"LIMIT""MARKET"
Example: "LIMIT"
info.​tifstring

The "Time In Force" (TIF) of an order indicates how long the order will remain active before being canceled, can be GTC, IOC.

  • GTC (Good-Till-Cancel) Order remains active for up to 30 days from the time of entry.
  • IOC (Immediate-Or-Cancel) Order will execute as much of the order as possible up to the requested price, provided there are existing orders that match or improve upon the price. An IOC order will cancel any unfilled quantity back to the requestor. If no matching orders are found, the IOC order will be canceled immediately. If the TIF is omitted, the order will default to GTC.
Enum"GTC""IOC"
Example: "GTC"
info.​exec_inst_flagsArray of stringsunique

Execution specific instructions that can be combined and used together.

  • ALO Ensures the order adds liquidity to the market rather than removing it. When this flag is enabled, the order will only be placed if it would not immediately execute against the current best bid or offer. If the order would otherwise result in an immediate match, it will be canceled or adjusted based on the exchange's rules. * AON Requests that the order either fully executes or cancel back to user with nothing done. All or none (AON) is only valid on market orders.
Items Enum"ALO""AON"
Example: ["ALO"]
info.​hold_fee_ratestring

The amount of fee asset being held by the order. This is not necessarily the fee charge associated with the order.

Example: "0.002"
info.​stpstring

Order level self trade protection instruction.

  • INVALID Order level self trade protections are in an invalid state and may result in order rejection.
  • NONE No self trade protections are enabled for this order.
  • CANCEL_AGGRESSIVE This order will be canceled in the result of a self trade.
  • CANCEL_BOTH This order and the resting order will both be canceled in the result of a self trade.
Enum"INVALID""NONE""CANCEL_AGGRESSIVE""CANCEL_BOTH"
Example: "NONE"
curl -i -X POST \
  https://docs.truemarkets.co/_mock/apis/cefi-direct/rest/v1/api/v1/orders \
  -H 'Content-Type: application/json' \
  -H 'x-truex-auth-signature: string' \
  -H 'x-truex-auth-timestamp: string' \
  -H 'x-truex-auth-token: YOUR_API_KEY_HERE' \
  -H 'x-truex-auth-userid: string' \
  -d '{
    "external_id": "321e7654-e89b-42d4-a456-426614174000",
    "info": {
      "msg_id": "799477895858487977",
      "parent_id": "432351810263056385",
      "client_id": "78901949710204932",
      "instrument_id": "78901949723181070",
      "qty": "0.00145",
      "price": "111067",
      "flags": [
        "USE_AGGRESSIVE_PRICING"
      ],
      "side": "BUY",
      "type": "LIMIT",
      "tif": "GTC",
      "exec_inst_flags": [
        "ALO"
      ],
      "hold_fee_rate": "0.002",
      "stp": "NONE"
    }
  }'

Responses

Successful operation.

Bodyapplication/json
idstring
Example: "799477895858487977"
statusstring

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.
Enum"INITIALIZED""NEW_PENDING""REJECTED""ACTIVE""FILLED""CANCEL_PENDING""CANCELED""MODIFY_PENDING"
Example: "ACTIVE"
order_infoobject(OrderInfo)
modify_infoobject(ModifyInfo)
external_idstring

A unique identifier created by the client. Must be in one of the following 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 (~).
Example: "EXT-ORDER-123"
ref_external_idstring

A unique identifier created by the client. Must be in one of the following 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 (~).
Example: "REF-EXT-ORDER-123"
pending_qtystring

Order quantity that has been acknowledge by the exchange but is not yet trading.

Example: "0"
leaves_qtystring

Order quantity that is currently active in the market.

Example: "0.00145"
exeuted_qtystring

Amount of quantity currently executed.

Example: "0.00239"
executed_vwapstring

Volume weighted average price calculation for all executions on the order.

Example: "111050.5"
Response
application/json
{ "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": "1", "parent_id": "1", "client_id": "1", "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

Modify an existing active order request.

Security
HMAC
Headers
x-truex-auth-useridstringrequired

Client identifier.

x-truex-auth-timestampstringrequired

Timestamp when request was made in seconds since epoch. Must be no older than 15 seconds and no more than 1 second in the future.

x-truex-auth-tokenstringrequired

The UUID affiliated with the HMAC key.

x-truex-auth-signaturestringrequired

The computed HMAC signature.

Bodyapplication/jsonrequired

Order modify request context.

idstring

The internal order ID of the order to be modified. This is the id that was set by the exchange and should be a purely numeric string.

Example: "1159718398822187014"
external_idstring

The external ID for the order to be modified set by the client. Must be in one of the following 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 (~).
Example: "123e7654-e89b-42d4-a456-426614174000"
infoobject(ModifyInfo)required
info.​msg_idstring^[1-9][0-9]*$

ID of last message to act upon the order.

Example: "1"
info.​parent_idstring^[1-9][0-9]*$

ID of the application creating the order, may be zero.

Example: "1"
info.​client_idstring^[1-9][0-9]*$required

The client ID the modification will be entered on behalf of.

Example: "1"
info.​prev_modifystring

ID of previous modify to act upon the order.

Example: "0"
info.​new_qtystringrequired

The new amount of base asset the order is requesting to tranasct.

Example: "0"
info.​new_pricestringrequired

The new highest or lowest price the order will buy or sell, respectively, at. Only required for LIMIT orders.

Example: "0"
info.​new_typestring

LIMIT orders may be converted to MARKET orders. The new MARKET order will immediately execute against the resting side of the order book providing there is available liquidity on the contra side of the request.

Value"MARKET"
Example: "MARKET"
curl -i -X PATCH \
  https://docs.truemarkets.co/_mock/apis/cefi-direct/rest/v1/api/v1/orders \
  -H 'Content-Type: application/json' \
  -H 'x-truex-auth-signature: string' \
  -H 'x-truex-auth-timestamp: string' \
  -H 'x-truex-auth-token: YOUR_API_KEY_HERE' \
  -H 'x-truex-auth-userid: string' \
  -d '{
    "id": "1159718398822187014",
    "external_id": "123e7654-e89b-42d4-a456-426614174000",
    "info": {
      "msg_id": "1",
      "parent_id": "1",
      "client_id": "1",
      "prev_modify": "0",
      "new_qty": "0",
      "new_price": "0",
      "new_type": "MARKET"
    }
  }'

Responses

Successful operation.

Bodyapplication/json
idstring
Example: "799477895858487977"
statusstring

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.
Enum"INITIALIZED""NEW_PENDING""REJECTED""ACTIVE""FILLED""CANCEL_PENDING""CANCELED""MODIFY_PENDING"
Example: "ACTIVE"
order_infoobject(OrderInfo)
modify_infoobject(ModifyInfo)
external_idstring

A unique identifier created by the client. Must be in one of the following 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 (~).
Example: "EXT-ORDER-123"
ref_external_idstring

A unique identifier created by the client. Must be in one of the following 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 (~).
Example: "REF-EXT-ORDER-123"
pending_qtystring

Order quantity that has been acknowledge by the exchange but is not yet trading.

Example: "0"
leaves_qtystring

Order quantity that is currently active in the market.

Example: "0.00145"
exeuted_qtystring

Amount of quantity currently executed.

Example: "0.00239"
executed_vwapstring

Volume weighted average price calculation for all executions on the order.

Example: "111050.5"
Response
application/json
{ "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": "1", "parent_id": "1", "client_id": "1", "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

Begins the cancellation process of an existing active order from the exchange. N.B. it is still possible to receive trades on the order that is being canceled.

Security
HMAC
Path
ref_idstringnon-empty^(?!^0$)[a-zA-Z0-9-]+$required

ID of order to cancel. For id_type=exchange (default): positive integer. For id_type=client: 1-18 char ASCII string or 36-char UUID.

Query
id_typestring

Type of ID the ref_id is, must be either 'client' or 'exchange'. If omitted will default to 'exchange'

Enum"client""exchange"
Headers
x-truex-auth-useridstringrequired

Client identifier.

x-truex-auth-timestampstringrequired

Timestamp when request was made in seconds since epoch. Must be no older than 15 seconds and no more than 1 second in the future.

x-truex-auth-tokenstringrequired

The UUID affiliated with the HMAC key.

x-truex-auth-signaturestringrequired

The computed HMAC signature.

curl -i -X DELETE \
  'https://docs.truemarkets.co/_mock/apis/cefi-direct/rest/v1/api/v1/orders/{ref_id}?id_type=client' \
  -H 'x-truex-auth-signature: string' \
  -H 'x-truex-auth-timestamp: string' \
  -H 'x-truex-auth-token: YOUR_API_KEY_HERE' \
  -H 'x-truex-auth-userid: string'

Responses

Successful operation.

Bodyapplication/json
idstring
Example: "799477895858487977"
statusstring

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.
Enum"INITIALIZED""NEW_PENDING""REJECTED""ACTIVE""FILLED""CANCEL_PENDING""CANCELED""MODIFY_PENDING"
Example: "ACTIVE"
order_infoobject(OrderInfo)
modify_infoobject(ModifyInfo)
external_idstring

A unique identifier created by the client. Must be in one of the following 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 (~).
Example: "EXT-ORDER-123"
ref_external_idstring

A unique identifier created by the client. Must be in one of the following 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 (~).
Example: "REF-EXT-ORDER-123"
pending_qtystring

Order quantity that has been acknowledge by the exchange but is not yet trading.

Example: "0"
leaves_qtystring

Order quantity that is currently active in the market.

Example: "0.00145"
exeuted_qtystring

Amount of quantity currently executed.

Example: "0.00239"
executed_vwapstring

Volume weighted average price calculation for all executions on the order.

Example: "111050.5"
Response
application/json
{ "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": "1", "parent_id": "1", "client_id": "1", "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" }

Balances

Query account balances across all assets.

Operations

Transfers

Initiate and track fund transfers between accounts.

Operations

Change Log

VersionDateNotes
v1.0.42026-03-12Compute quote now works for both base and qoute bases.
v1.0.32026-01-27Pluralize all endpoints. Deprecate singular versions.
v1.0.22026-01-24Add API versioning support and versions endpoint.
v1.0.12025-10-24Add gateway health endpoint.
v1.0.02025-10-16Initial Release.