{"_id":"564b853adda79a19000f2670","project":"55773a5ba042551900b002cb","user":"546d17e2eb9cfd1400dd4529","version":{"_id":"55773a5ba042551900b002ce","project":"55773a5ba042551900b002cb","__v":17,"createdAt":"2015-06-09T19:11:23.764Z","releaseDate":"2015-06-09T19:11:23.764Z","categories":["55773a5ca042551900b002cf","55773a6ce6063e0d00481380","55773ab007e7110d001043ec","55773abaa042551900b002d5","55773ac207e7110d001043ed","55773acb07e7110d001043ee","55773ad3a042551900b002d6","55773adce6063e0d00481383","55773ae4a042551900b002d7","55773af307e7110d001043ef","55773af907e7110d001043f0","55773b0407e7110d001043f1","563a4f7ad25e8919005f3f39","563a4fcaa19edf0d00972321","564a70dc4cd0521700523edf","564b797bcc472d0d00da9435","564b855b766d4923004e1fd1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Motherboard","version_clean":"1.0.0","version":"1"},"__v":34,"category":{"_id":"55773b0407e7110d001043f1","project":"55773a5ba042551900b002cb","pages":["564b851685e4e92b00fb4fa2","564b853adda79a19000f2670","564b8548cc472d0d00da945b"],"version":"55773a5ba042551900b002ce","__v":3,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-06-09T19:14:12.710Z","from_sync":false,"order":13,"slug":"streaming-api","title":"Streaming API"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-17T19:51:22.095Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"The **Live Timing** endpoint delivers real-time streaming data via a websocket connection.\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"**wss://socket.api.triathlon.org/timing**\",\n  \"title\": \"Live Timing Websocket Endpoint\"\n}\n[/block]\nYou may connect to the live timing websocket feed by connecting to `wss://socket.api.triathlon.org/timing` For live timing applications it is suggested you retrieve the initial state from the [Live Timing endpoint](https://developers.triathlon.org/docs/live-timing) and future updates from the streaming API to avoid any delay in retrieving the data as new data is only delivered when available.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Live Timing Data\"\n}\n[/block]\nData is delivered in the same format as the [Live Timing REST endpoint](https://developers.triathlon.org/docs/live-timing) but **excludes the splits object** for brevity of the message and users should consult that documentation as well as the [Live Timing Standard](https://developers.triathlon.org/v1/page/live-timing-standard-v11) for more information as to the data delivered. If you require full split data consider taking the webhook feed from the [Subscription API](https://developers.triathlon.org/docs/subscriptions-api-overview) or request the full timing message from the [REST API](https://developers.triathlon.org/docs/live-timing) on a timing push.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n   \\\"date\\\":\\\"2016-09-11 18:35:05.143−04:00\\\",\\n   \\\"start_time\\\":\\\"2016-09-11 16:30:13−04:00\\\",\\n   \\\"event_id\\\":\\\"97645\\\",\\n   \\\"event_name\\\":\\\"2016 ITU World Triathlon Grand Final Cozumel\\\",\\n   \\\"prog_id\\\":\\\"281501\\\",\\n   \\\"prog_name\\\":\\\"Elite Men\\\",\\n   \\\"wetsuit\\\":\\\"false\\\",\\n   \\\"sandbox\\\":\\\"false\\\",\\n   \\\"num_athletes\\\":\\\"2\\\",\\n   \\\"status\\\":\\\"live\\\",\\n   \\\"latest\\\":{\\n      \\\"segment_id\\\":\\\"3\\\",\\n      \\\"segment_name\\\":\\\"Bike Lap 1\\\",\\n      \\\"num_athletes\\\":\\\"1\\\"\\n   },\\n   \\\"conditions\\\":{\\n      \\\"air_temp\\\":\\\"16.5\\\",\\n      \\\"water_temp\\\":\\\"18.4\\\"\\n   },\\n   \\\"athletes\\\":[\\n      {\\n         \\\"id\\\":\\\"30433\\\",\\n         \\\"start_num\\\":\\\"11\\\",\\n         \\\"name\\\":\\\"Henri Schoeman\\\",\\n         \\\"country\\\":\\\"RSA\\\",\\n         \\\"segment_id\\\":\\\"15\\\",\\n         \\\"time\\\":\\\"01:46:50\\\",\\n         \\\"difference\\\":\\\"00:00:00\\\",\\n         \\\"position\\\":\\\"1\\\",\\n         \\\"status\\\":null,\\n         \\\"splits\\\":[\\n            {\\n               \\\"id\\\":\\\"1\\\",\\n               \\\"name\\\":\\\"Swim Exit\\\",\\n               \\\"time\\\":\\\"00:16:55\\\",\\n               \\\"lap_time\\\":\\\"00:16:55\\\",\\n               \\\"difference\\\":\\\"00:00:02\\\",\\n               \\\"position\\\":\\\"2\\\"\\n            },\\n            {\\n               \\\"id\\\":\\\"2\\\",\\n               \\\"name\\\":\\\"Transition 1\\\",\\n               \\\"time\\\":\\\"00:17:48\\\",\\n               \\\"lap_time\\\":\\\"00:00:53\\\",\\n               \\\"difference\\\":\\\"00:00:04\\\",\\n               \\\"position\\\":\\\"2\\\"\\n            },\\n            {\\n               \\\"id\\\":\\\"3\\\",\\n               \\\"name\\\":\\\"Bike Lap 1\\\",\\n               \\\"time\\\":\\\"00:24:46\\\",\\n               \\\"lap_time\\\":\\\"00:06:58\\\",\\n               \\\"difference\\\":\\\"00:00:00\\\",\\n               \\\"position\\\":\\\"1\\\"\\n            }\\n         ]\\n      },\\n      {\\n         \\\"id\\\":\\\"11378\\\",\\n         \\\"start_num\\\":\\\"2\\\",\\n         \\\"name\\\":\\\"Jonathan Brownlee\\\",\\n         \\\"country\\\":\\\"GBR\\\",\\n         \\\"segment_id\\\":\\\"15\\\",\\n         \\\"time\\\":\\\"01:47:08\\\",\\n         \\\"difference\\\":\\\"00:00:18\\\",\\n         \\\"position\\\":\\\"2\\\",\\n         \\\"status\\\":null,\\n         \\\"splits\\\":[\\n            {\\n               \\\"id\\\":\\\"1\\\",\\n               \\\"name\\\":\\\"Swim Exit\\\",\\n               \\\"time\\\":\\\"00:16:53\\\",\\n               \\\"lap_time\\\":\\\"00:16:53\\\",\\n               \\\"difference\\\":\\\"00:00:00\\\",\\n               \\\"position\\\":\\\"1\\\"\\n            },\\n            {\\n               \\\"id\\\":\\\"2\\\",\\n               \\\"name\\\":\\\"Transition 1\\\",\\n               \\\"time\\\":\\\"00:17:44\\\",\\n               \\\"lap_time\\\":\\\"00:00:51\\\",\\n               \\\"difference\\\":\\\"00:00:00\\\",\\n               \\\"position\\\":\\\"1\\\"\\n            }\\n         ]\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"leaderboard","type":"basic","title":"Live Timing"}
The **Live Timing** endpoint delivers real-time streaming data via a websocket connection. [block:callout] { "type": "success", "body": "**wss://socket.api.triathlon.org/timing**", "title": "Live Timing Websocket Endpoint" } [/block] You may connect to the live timing websocket feed by connecting to `wss://socket.api.triathlon.org/timing` For live timing applications it is suggested you retrieve the initial state from the [Live Timing endpoint](https://developers.triathlon.org/docs/live-timing) and future updates from the streaming API to avoid any delay in retrieving the data as new data is only delivered when available. [block:api-header] { "type": "basic", "title": "Live Timing Data" } [/block] Data is delivered in the same format as the [Live Timing REST endpoint](https://developers.triathlon.org/docs/live-timing) but **excludes the splits object** for brevity of the message and users should consult that documentation as well as the [Live Timing Standard](https://developers.triathlon.org/v1/page/live-timing-standard-v11) for more information as to the data delivered. If you require full split data consider taking the webhook feed from the [Subscription API](https://developers.triathlon.org/docs/subscriptions-api-overview) or request the full timing message from the [REST API](https://developers.triathlon.org/docs/live-timing) on a timing push. [block:code] { "codes": [ { "code": "{\n \"date\":\"2016-09-11 18:35:05.143−04:00\",\n \"start_time\":\"2016-09-11 16:30:13−04:00\",\n \"event_id\":\"97645\",\n \"event_name\":\"2016 ITU World Triathlon Grand Final Cozumel\",\n \"prog_id\":\"281501\",\n \"prog_name\":\"Elite Men\",\n \"wetsuit\":\"false\",\n \"sandbox\":\"false\",\n \"num_athletes\":\"2\",\n \"status\":\"live\",\n \"latest\":{\n \"segment_id\":\"3\",\n \"segment_name\":\"Bike Lap 1\",\n \"num_athletes\":\"1\"\n },\n \"conditions\":{\n \"air_temp\":\"16.5\",\n \"water_temp\":\"18.4\"\n },\n \"athletes\":[\n {\n \"id\":\"30433\",\n \"start_num\":\"11\",\n \"name\":\"Henri Schoeman\",\n \"country\":\"RSA\",\n \"segment_id\":\"15\",\n \"time\":\"01:46:50\",\n \"difference\":\"00:00:00\",\n \"position\":\"1\",\n \"status\":null,\n \"splits\":[\n {\n \"id\":\"1\",\n \"name\":\"Swim Exit\",\n \"time\":\"00:16:55\",\n \"lap_time\":\"00:16:55\",\n \"difference\":\"00:00:02\",\n \"position\":\"2\"\n },\n {\n \"id\":\"2\",\n \"name\":\"Transition 1\",\n \"time\":\"00:17:48\",\n \"lap_time\":\"00:00:53\",\n \"difference\":\"00:00:04\",\n \"position\":\"2\"\n },\n {\n \"id\":\"3\",\n \"name\":\"Bike Lap 1\",\n \"time\":\"00:24:46\",\n \"lap_time\":\"00:06:58\",\n \"difference\":\"00:00:00\",\n \"position\":\"1\"\n }\n ]\n },\n {\n \"id\":\"11378\",\n \"start_num\":\"2\",\n \"name\":\"Jonathan Brownlee\",\n \"country\":\"GBR\",\n \"segment_id\":\"15\",\n \"time\":\"01:47:08\",\n \"difference\":\"00:00:18\",\n \"position\":\"2\",\n \"status\":null,\n \"splits\":[\n {\n \"id\":\"1\",\n \"name\":\"Swim Exit\",\n \"time\":\"00:16:53\",\n \"lap_time\":\"00:16:53\",\n \"difference\":\"00:00:00\",\n \"position\":\"1\"\n },\n {\n \"id\":\"2\",\n \"name\":\"Transition 1\",\n \"time\":\"00:17:44\",\n \"lap_time\":\"00:00:51\",\n \"difference\":\"00:00:00\",\n \"position\":\"1\"\n }\n ]\n }\n ]\n}", "language": "json" } ] } [/block]