Method: CHANNEL Version: v1.0.3 ## Servers ### uat UAT websocket sandbox server. Host: uat.truex.co Protocol: wss ### production Production websocket server. Host: prod.truex.co Protocol: wss ## Messages ### subscription #### Payload Schema - **type** (string, required) Action the request is intending to take. Enum: SUBSCRIBE, SUBSCRIBE_NO_AUTH, UNSUBSCRIBE, UNSUBSCRIBE_NO_AUTH - **item_names** (array, required) List of items the request is intending to act upon. For market data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains instrument symbols. For the DROPCOPY channel, this contains client IDs as strings. - **channels** (array, required) List of channels the request is intending to interact with. Note: DROPCOPY channel requires authentication. - **timestamp** (string, required) Required field on all requests; a UTC Unix epoch in seconds. Must not be in the future and must be no older than 15 seconds relative to server time. - **organization_id** (string) Exchange designation ID will be UUIDv4. Must be supplied in human readable form. RFC 9562. - **key** (string) Exchange supplied API key will be in UUIDv4. Must be supplied in human readable form. RFC 9562. - **signature** (string) The computed HMAC signature. ### welcome #### Payload Schema - **connections** (string) Current number of active connections from the source IP. - **channel** (string) Channel this message originated from. Enum: WEBSOCKET - **update** (string) Type of update for the current message. Enum: WELCOME - **message** (string) Message supplied when initiating a connection with the server. - **version** (string) Current version of the websocket API. - **datetime** (string) Current datetime of when the server sent the message, ### confirmation #### Payload Schema - **timestamp** (string) Server timestamp when the confirmation was generated. - **channel** (string) Channel this message originated from. Enum: WEBSOCKET - **update** (string) Type of update for the current message. Enum: SNAPSHOT, UPDATE - **status** (string) Current status of the websocket connection. Enum: INVALID, ERROR, UNAUTHORIZED, UNAUTHENTICATED, AUTHENTICATED - **subscriptions** (array) List of current subscriptions. For DROPCOPY channel, item_names contains client IDs. - **channel** (string) Enum: INSTRUMENT, EBBO, DEPTH, TRADE, DROPCOPY - **item_names** (array) Subscribed items. For market data channels, these are instrument symbols. For DROPCOPY, these are client IDs. ### instrument #### Payload Schema - **seqnum** (string) Current sequence number of the channel. - **channel** (string) Channel this message originated from. Enum: INSTRUMENT - **update** (string) Type of update for the current message. Enum: SNAPSHOT, UPDATE - **data** (object) - **id** (string) Exchange assigned ID of the instrument. - **status** (string) Current instrument state. Enum: DISABLED, OPENING, ACTIVE, HALTED - **info** (object) - **symbol** (string) Human readable representation of the instrument. - **reference_price** (string) Price used for initial price limit/band calcuations. - **base_asset_id** (string) ID of the base asset. - **quote_asset_id** (string) ID of the quote asset. - **price_limit_window_secs** (string) Number of seconds in the price limit's sliding window. - **price_limit_percent** (string) Specifies the percentage threshold for price movement beyond a reference price (e.g., the midpoint or previous close) at which the exchange will take action. If the price of a trade or order breaches this threshold, the exchange may halt trading, trigger a circuit breaker, or initiate other predefined actions to ensure market stability. - **price_bands_percent** (string) Defines the acceptable price range for order validation within the market. The price bands ensure that orders are priced within a range around the market's midpoint, adjusted for increments and thresholds. - **stats** (object) - **last_24hr_notional** (string) The notional (quantity * price) amount of REFERENCE_ASSET traded over the last 24hr period. - **last_24hr_quantity** (string) The quantity traded over the last 24 hour period. ### trade #### Payload Schema - **seqnum** (string) Current sequence number of the channel. - **channel** (string) Channel this message originated from. Enum: TRADE - **update** (string) Type of update for the current message. Enum: SNAPSHOT, UPDATE - **data** (object) - **match_id** (string) A unique identifier for the trade match event. - **taking_side** (string) Which side initiated the trade. Enum: BUY, SELL - **info** (object) Last trade information. - **price** (string) - **qty** (string) - **timestamp** (string) The Unix UTC timestamp (in nanoseconds) when the event occurred. - **symbol** (string) Human readable representation of the instrument. ### ebbo #### Payload Schema - **seqnum** (string) Current sequence number of the channel. - **channel** (string) Channel this message originated from. Enum: EBBO - **update** (string) Type of update for the current message. Enum: SNAPSHOT, UPDATE - **data** (object) - **id** (string) Exchange assigned ID of the market data. - **symbol** (string) Human readable representation of the instrument. - **info** (object) - **last_trade** (object) Last trade information. - **price** (string) - **qty** (string) - **timestamp** (string) The Unix UTC timestamp (in nanoseconds) when the event occurred. - **best_bid** (object) Current exchange best bid. - **price** (string) Price at this level. - **qty** (string) Aggregate quantity resting at this level. - **depth** (string) Number of orders resting at this level. - **best_ask** (object) Current exchange best ask. - **last_update** (string) A UTC Unix epoch in nanoseconds indicating when the book was last updated. ### depth #### Payload Schema - **seqnum** (string) Current sequence number of the channel. - **channel** (string) Channel this message originated from. Enum: DEPTH - **update** (string) Type of update for the current message. Enum: SNAPSHOT, UPDATE - **data** (object) - **symbol** (string) Human readable representation of the instrument. - **bids** (array) - **price** (string) Price at this level. - **qty** (string) Aggregate quantity resting at this level. - **depth** (string) Number of orders resting at this level. - **asks** (array) ### dropcopy #### Payload Schema - **seqnum** (string) Per-connection sequence number for the DROPCOPY channel. - **channel** (string) Channel this message originated from. Enum: DROPCOPY - **update** (string) Type of update for the current message. SNAPSHOT is sent upon initial subscription with all active orders. UPDATE is sent for subsequent order state changes. Enum: SNAPSHOT, UPDATE - **data** (object) Order data representing the current state of an order. - **order_id** (string) Exchange assigned unique identifier for the order. - **client_id** (string) Client ID that owns this order. - **instrument_id** (string) Exchange assigned ID of the instrument being traded. - **external_id** (string) Client-supplied external order identifier. - **symbol** (string) Human readable representation of the instrument. - **side** (string) Order side. Enum: BUY, SELL - **order_type** (string) Type of order. Enum: LIMIT, MARKET, NOTIONAL_LIMIT - **time_in_force** (string) Time in force for the order. Enum: GTC, IOC - **status** (string) Current state of the order. Enum: NEW_PENDING, ACTIVE, FILLED, CANCEL_PENDING, CANCELED, MODIFY_PENDING, REJECTED - **price** (string) Order price (for limit orders). - **quantity** (string) Original order quantity. - **leaves_qty** (string) Remaining quantity to be filled. - **executed_qty** (string) Total quantity that has been executed. - **executed_vwap** (string) Volume weighted average price of executed quantity. - **event_type** (string) Type of event that triggered this update (only present on UPDATE messages). Enum: NEW, TRADE, CANCELED, MODIFIED, REJECTED - **trade_price** (string) Price of the last trade (only present on TRADE events). - **trade_qty** (string) Quantity of the last trade (only present on TRADE events). - **timestamp** (string) UTC Unix timestamp in nanoseconds when the event occurred.