Overview
This API allows clients to interact with the TrueX trading platform for real time instrument, market data and exchange transactions.
Authentication
Certain API requests must be authenticated using HMAC-SHA256 signature authentication.
Links
- 📖 Full API Documentation: https://docs.truex.co/
- 📧 Support: support@truex.co
Servers
- wss://uat.truex.co/wssuat
TrueX UAT websocket sandbox server.
Security:
- HTTP API key
- Name: x-no-auth
- In: query
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.
Required members
- timestamp: A UTC Unix epoch in seconds.
- HTTP API key
- Name: x-api-key
- In: query
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).
Required members
- 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.
- wss://prod.truex.co/wssproduction
TrueX production websocket server.
Security:
- HTTP API key
- Name: x-no-auth
- In: query
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.
Required members
- timestamp: A UTC Unix epoch in seconds.
- HTTP API key
- Name: x-api-key
- In: query
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).
Required members
- 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.
Operations
SEND /api/v1
Message sent to server indicating what channels and data the user would like to subscribe to.
Operation IDsubscribeToChannelAvailable only on servers:
Accepts the following message:
Message IDsubscriptionobjectExamples
{ "type": "SUBSCRIBE", "item_names": [ "BTC-PYUSD" ], "channels": [ "INSTRUMENT" ], "timestamp": "1741894773", "organization_id": "30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4", "key": "string", "signature": "gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=" }
This example has been generated automatically.
RECEIVE /api/v1
Message received when connecting to the server and establishing a websocket connection.
Operation IDwelcomeFromServerAvailable only on servers:
Accepts the following message:
Message IDwelcomeobjectExamples
{ "connections": "3", "channel": "WEBSOCKET", "update": "WELCOME", "message": "Welcome to TrueX!", "version": "1.0.0", "datetime": "2025-01-01 17:00:00" }
This example has been generated automatically.
RECEIVE /api/v1
Message sent from server containing channels and items the user is currently subscribed to.
Operation IDconfirmationFromServerAvailable only on servers:
Accepts the following message:
Message IDconfirmationobjectExamples
{ "timestamp": "1741894944", "channel": "TRADE", "update": "SNAPSHOT", "status": "AUTHENTICATED", "subscriptions": [ { "channel": "EBBO", "item_names": [ "BTC-PYUSD" ] } ] }
This example has been generated automatically.
RECEIVE /api/v1
Message sent from server with instrument data.
Operation IDinstrumentFromServerAvailable only on servers:
Accepts the following message:
Message IDinstrumentobjectExamples
{ "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" } } }
This example has been generated automatically.
RECEIVE /api/v1
Message sent from server containing the lasted trade information for a subscribed instrument.
Operation IDtradeFromServerAvailable only on servers:
Accepts the following message:
Message IDtradeobjectExamples
{ "seqnum": "100001", "channel": "TRADE", "update": "UPDATE", "status": "AUTHENTICATED", "data": { "match_id": "1234576970", "trade_price": "75000.50", "trade_qty": "100.00", "liq_flag": "TAKER" } }
This example has been generated automatically.
RECEIVE /api/v1
Message sent from server containing the lasted exchange best bid and offer information for a subscribed instrument.
Operation IDebboFromServerAvailable only on servers:
Accepts the following message:
Message IDebboobjectExamples
{ "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" } } }
This example has been generated automatically.
Messages
- #1Message IDsubscriptionobject
- #2Message IDwelcomeobject
- #3Message IDconfirmationobject
- #4Message IDinstrumentobject
- #5Message IDtradeobject
- #6Message IDebboobject
Schemas
- object
- object
- object
- object
- object