Tick Charts
Using Tick Charts
Requesting Tick Charts
To get Tick Chart data, we can use the same process described in the Market Data section. Just like with Market Data, we need to open and authorize a WebSocket first. If you’re following the comprehensive JavaScript tutorial, you can find tick chart examples here.
Just like requesting regular chart data, we must construct a request body with the symbol, chartDescription, and timeRange fields. However, we need to lock elementSize to 1 and set underlyingType to “Tick”. For example:
The client calls the standard md/getChart endpoint and passes the request to it. The Tradovate server responds with the standard JSON object schema for chart data. Because an unsubscription request requires the real-time subscription ID sent with this response, the client should store the ID of each subscription that they create so that they can properly unsubscribe later.
Data stream messages A typical data stream message has the following structure:
Using the Tick Stream
The following code snippet is an example of how to process tick chart data stream messages and calculate actual ticks for client consumption.
The function takes a data stream message and converts its packets into a list of actual ticks. Usage of this function assumes that you’ll be passing it the message data retrieved from the WebSocket. Because tick stream data can arrive out of chronological order, it is the client’s responsibility to store and sort pertinent portions of this data.

