TrueX REST API (1.0.0)

Overview

This API allows clients to interact with the TrueX 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.

Download OpenAPI description
Languages
Servers
Mock server
https://docs.truex.co/_mock/rest/v1/
https://prod.truex.co/

Assets

Operations

Instruments

Operations

Market Data

Operations

Clients

Operations

Orders

Operations

Balances

Operations

Transfers

Operations

Get transfer

Request

Get transfer details currently active on the exchange.

Query
asset_idstring

ID of the asset to query active transfers for.

transfer_idstring

ID of the transfer to query for.

curl -i -X GET \
  'https://docs.truex.co/_mock/rest/v1/api/v1/transfer?asset_id=string&transfer_id=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'

Responses

Successful operation.

Bodyapplication/jsonArray [
transfer_idstring
Example: "1234576970"
requestobject(TransferNew)
]
Response
application/json
[ { "transfer_id": "1234576970", "request": {} } ]

Initiate transfer

Request

Initiate a new transfer of assets to/from the exchange.

Headers
x-truex-auth-useridstringrequired

Client identifier.

x-truex-auth-timestampstringrequired

Timestamp when request was made in seconds since epoch.

x-truex-auth-tokenstringrequired

The UUID affiliated with the HMAC key.

x-truex-auth-signaturestringrequired

The computed HMAC signature.

Bodyapplication/jsonrequired

Transfer new context object.

asset_idstring

Exchange assigned ID of asset.

Example: "1234576970"
client_idstring

Exchange assigned ID of client.

Example: "1234576970"
amountstring

Amount of asset to transfer.

Example: "1000000.00"
typestring

Direction of the transfer.

  • DEPOSIT Place the amount specified on the exchange.
  • WITHDRAWL Remove the amount specified from the exchange.
Enum"DEPOSIT""WITHDRAWL"
Example: "WITHDRAWL"
platformstring

The type of service to use for the transfer. Must match with the corresponding instructions defined below.

  • FIAT Indicates the transfer should use the traditional banking system used to handle the corresponding fiat currency. Note, performing a transfer with fiat on a stablecoin asset will result in an automatic conversion.
  • CRYPTO Indicates the transfer uses a blockchain platform.
Enum"FIAT""CRYPTO"
Example: "CRYPTO"
instructionsFiatInstructions (object) or CryptoInstructions (object)

Platform specific instructions. The defined object must match with the platform value.

  • FiatInstructions Must be used when setting the platform to FIAT
  • CryptoInstructions Must be used when setting the platform to CRYPTO
One of:

Platform specific instructions. The defined object must match with the platform value.

  • FiatInstructions Must be used when setting the platform to FIAT
  • CryptoInstructions Must be used when setting the platform to CRYPTO
curl -i -X POST \
  https://docs.truex.co/_mock/rest/v1/api/v1/transfer \
  -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 '{
    "asset_id": "1234576970",
    "client_id": "1234576970",
    "amount": "1000000.00",
    "type": "WITHDRAWL",
    "platform": "CRYPTO",
    "instructions": {
      "fiat_account_id": "ed671d2b-bb9e-4cf5-9eb4-71b6db672207",
      "identity_id": "b2a99c93-f1ee-41ed-9e9e-ec704cfbca4b",
      "account_id": "b2a99c93-f1ee-41ed-9e9e-ec704cfbca4b",
      "includes_fee": true
    }
  }'

Responses

Successful operation.

Bodyapplication/json
transfer_idstring
Example: "1234576970"
requestobject(TransferNew)
Response
application/json
{ "transfer_id": "1234576970", "request": { "asset_id": "1234576970", "client_id": "1234576970", "amount": "1000000.00", "type": "WITHDRAWL", "platform": "CRYPTO", "instructions": {} } }