This API allows clients to interact with the TrueX trading platform for real time instrument, market data and exchange transactions.
Certain API requests must be authenticated using HMAC-SHA256 signature authentication.
TrueX UAT websocket sandbox server.
Clients may subscribe to endpoints without an API key or computing an HMAC signature. These endpoints are rate limited by the server, coalescing and only sending data at a predetermined rate. Non-authenticated connections can be upgraded by supplying an API key and computed HMAC signature on the the next request sent to the server.
Unauthenticated requests must be have the type: SUBSCRIBE_NO_AUTH
and not include the follow fields on the requet: organization_id
, key
, signature
.
timestamp
: A UTC Unix epoch in seconds.Clients must compute and send an HMAC signature in signature
member of the request structure. The HMAC signature gets applied to the following payload:
timestamp + TRUEXWS + key + path
Note, path is everything after the domain name including the / (e.g. /api/v1).
signature
: The signature generated from processing the payload with the HMAC key.key
: The ID of the HMAC key being used.timestamp
: A UTC Unix epoch in seconds.TrueX production websocket server.
Clients may subscribe to endpoints without an API key or computing an HMAC signature. These endpoints are rate limited by the server, coalescing and only sending data at a predetermined rate. Non-authenticated connections can be upgraded by supplying an API key and computed HMAC signature on the the next request sent to the server.
Unauthenticated requests must be have the type: SUBSCRIBE_NO_AUTH
and not include the follow fields on the requet: organization_id
, key
, signature
.
timestamp
: A UTC Unix epoch in seconds.Clients must compute and send an HMAC signature in signature
member of the request structure. The HMAC signature gets applied to the following payload:
timestamp + TRUEXWS + key + path
Note, path is everything after the domain name including the / (e.g. /api/v1).
signature
: The signature generated from processing the payload with the HMAC key.key
: The ID of the HMAC key being used.timestamp
: A UTC Unix epoch in seconds.Message sent to server indicating what channels and data the user would like to subscribe to.
Available only on servers:
Accepts the following message:
{
"type": "SUBSCRIBE",
"item_names": [
"BTC-PYUSD"
],
"channels": [
"INSTRUMENT"
],
"timestamp": "1741894773",
"organization_id": "30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4",
"key": "string",
"signature": "gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY="
}
Message received when connecting to the server and establishing a websocket connection.
Available only on servers:
Accepts the following message:
{
"connections": "3",
"channel": "WEBSOCKET",
"update": "WELCOME",
"message": "Welcome to TrueX!",
"version": "1.0.0",
"datetime": "2025-01-01 17:00:00"
}
Message sent from server containing channels and items the user is currently subscribed to.
Available only on servers:
Accepts the following message:
{
"timestamp": "1741894944",
"channel": "TRADE",
"update": "SNAPSHOT",
"status": "AUTHENTICATED",
"subscriptions": [
{
"channel": "EBBO",
"item_names": [
"BTC-PYUSD"
]
}
]
}
Message sent from server with instrument data.
Available only on servers:
Accepts the following message:
{
"seqnum": "12345",
"channel": "INSTRUMENT",
"update": "SNAPSHOT",
"status": "UNAUTHENTICATED",
"data": {
"id": "123456789",
"status": "ACTIVE",
"info": {
"symbol": "BTC-PYUSD",
"reference_price": "75000.50",
"base_asset_id": "123456789",
"quote_asset_id": "123456789",
"price_limit_window_secs": "3600",
"price_limit_percent": "string",
"price_bands_percent": "0.025"
},
"stats": {
"last_24hr_notional": "4325606.30380",
"last_24hr_quantity": "123754.2345"
}
}
}
Message sent from server containing the lasted trade information for a subscribed instrument.
Available only on servers:
Accepts the following message:
{
"seqnum": "100001",
"channel": "TRADE",
"update": "UPDATE",
"status": "AUTHENTICATED",
"data": {
"match_id": "1234576970",
"trade_price": "75000.50",
"trade_qty": "100.00",
"liq_flag": "TAKER"
}
}
Message sent from server containing the lasted exchange best bid and offer information for a subscribed instrument.
Available only on servers:
Accepts the following message:
{
"seqnum": "20210209",
"channel": "EBBO",
"update": "SNAPSHOT",
"status": "AUTHENTICATED",
"data": {
"id": "0987654321",
"status": "ENABLED",
"info": {
"last_trade": {
"price": "75.50",
"qty": "1.5"
},
"best_bid": {
"price": "75.50",
"qty": "1.5"
},
"best_ask": {
"price": "75.50",
"qty": "1.5"
},
"last_update": "123478909"
}
}
}