TSW WebSocket API Help

Position

The Position API will give you Information about the current coordinates and speed of the player as well as the current Date and Time of the World.

Subscribe

{ "subscribe": "pos", "interval": 10000, //optional, default value is 10000ms }

Response

The server will send the Updates every 10 Seconds if you subscribe without an interval. Intervals below 1000ms will be executed every 1000ms for performance reasons.

{ "event":"pos", "lat":53.08251953125, "long":8.815362930297852, "speed_kph":253.83319091796875, "time_iso_8601":"2025-01-14T10-01-16Z" }

event is the name of the event (in this case pos)
lat, long representing the coordinates of the current player
speed_kph speed of the player in Kilometer per Hour
time_iso_8601 the current date/time formated as a ISO 8601 String

Unsubscribe

To stop receiving updates about position, speed, and date/time, you can send an unsubscribe message in the following format:

{ "unsubscribe": "pos" }
Last modified: 16 January 2025