{"id":3021,"date":"2023-08-07T13:28:22","date_gmt":"2023-08-07T13:28:22","guid":{"rendered":"https:\/\/www.tpd.zone\/?page_id=3021"},"modified":"2023-08-21T10:32:18","modified_gmt":"2023-08-21T10:32:18","slug":"web-socket","status":"publish","type":"page","link":"https:\/\/www.tpd.zone\/app-vendors\/web-socket\/","title":{"rendered":"Web Socket"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"3021\" class=\"elementor elementor-3021\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-930fbfb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"930fbfb\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5ac26bb\" data-id=\"5ac26bb\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4d2180d elementor-nav-menu__align-right elementor-nav-menu--dropdown-tablet elementor-nav-menu__text-align-aside elementor-nav-menu--toggle elementor-nav-menu--burger elementor-widget elementor-widget-nav-menu\" data-id=\"4d2180d\" data-element_type=\"widget\" data-settings=\"{&quot;layout&quot;:&quot;horizontal&quot;,&quot;submenu_icon&quot;:{&quot;value&quot;:&quot;&lt;i class=\\&quot;fas fa-caret-down\\&quot;&gt;&lt;\\\/i&gt;&quot;,&quot;library&quot;:&quot;fa-solid&quot;},&quot;toggle&quot;:&quot;burger&quot;}\" data-widget_type=\"nav-menu.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<link rel=\"stylesheet\" href=\"https:\/\/www.tpd.zone\/wp-content\/plugins\/elementor-pro\/assets\/css\/widget-nav-menu.min.css\">\t\t\t<nav class=\"elementor-nav-menu--main elementor-nav-menu__container elementor-nav-menu--layout-horizontal e--pointer-underline e--animation-fade\">\n\t\t\t\t<ul id=\"menu-1-4d2180d\" class=\"elementor-nav-menu\"><li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3023\"><a href=\"https:\/\/www.tpd.zone\/app-vendors\/\" class=\"elementor-item\">App Vendors<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3025\"><a href=\"https:\/\/www.tpd.zone\/app-vendors\/json-api\/\" class=\"elementor-item\">JSON API<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3024\"><a href=\"https:\/\/www.tpd.zone\/app-vendors\/web-socket\/\" class=\"elementor-item\">Web Socket<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3068\"><a href=\"https:\/\/www.tpd.zone\/app-vendors\/ws-docs\/\" class=\"elementor-item\">WS Docs<\/a><\/li>\n<\/ul>\t\t\t<\/nav>\n\t\t\t\t\t<div class=\"elementor-menu-toggle\" role=\"button\" tabindex=\"0\" aria-label=\"Menu Toggle\" aria-expanded=\"false\">\n\t\t\t<i aria-hidden=\"true\" role=\"presentation\" class=\"elementor-menu-toggle__icon--open eicon-menu-bar\"><\/i><i aria-hidden=\"true\" role=\"presentation\" class=\"elementor-menu-toggle__icon--close eicon-close\"><\/i>\t\t\t<span class=\"elementor-screen-only\">Menu<\/span>\n\t\t<\/div>\n\t\t\t\t\t<nav class=\"elementor-nav-menu--dropdown elementor-nav-menu__container\" aria-hidden=\"true\">\n\t\t\t\t<ul id=\"menu-2-4d2180d\" class=\"elementor-nav-menu\"><li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3023\"><a href=\"https:\/\/www.tpd.zone\/app-vendors\/\" class=\"elementor-item\" tabindex=\"-1\">App Vendors<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3025\"><a href=\"https:\/\/www.tpd.zone\/app-vendors\/json-api\/\" class=\"elementor-item\" tabindex=\"-1\">JSON API<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3024\"><a href=\"https:\/\/www.tpd.zone\/app-vendors\/web-socket\/\" class=\"elementor-item\" tabindex=\"-1\">Web Socket<\/a><\/li>\n<li class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-3068\"><a href=\"https:\/\/www.tpd.zone\/app-vendors\/ws-docs\/\" class=\"elementor-item\" tabindex=\"-1\">WS Docs<\/a><\/li>\n<\/ul>\t\t\t<\/nav>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-214371b elementor-widget elementor-widget-heading\" data-id=\"214371b\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.19.0 - 26-02-2024 *\/\n.elementor-heading-title{padding:0;margin:0;line-height:1}.elementor-widget-heading .elementor-heading-title[class*=elementor-size-]>a{color:inherit;font-size:inherit;line-height:inherit}.elementor-widget-heading .elementor-heading-title.elementor-size-small{font-size:15px}.elementor-widget-heading .elementor-heading-title.elementor-size-medium{font-size:19px}.elementor-widget-heading .elementor-heading-title.elementor-size-large{font-size:29px}.elementor-widget-heading .elementor-heading-title.elementor-size-xl{font-size:39px}.elementor-widget-heading .elementor-heading-title.elementor-size-xxl{font-size:59px}<\/style><h2 class=\"elementor-heading-title elementor-size-large\">Connecting to the Stream<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1a4e055 elementor-widget elementor-widget-text-editor\" data-id=\"1a4e055\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.19.0 - 26-02-2024 *\/\n.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#69727d;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#69727d;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}<\/style>\t\t\t\t<p>Connection is made via a web socket at wss:\/\/stream.tpd.zone\/realtime_1.3<\/p><p>A response is received with a status message, message and connection id if successful.<\/p><p>The client must then request a race within 4 seconds of the initial connection. This message includes your streaming Vendor Key, the clients own paid for access Client Key, an array of share codes they wish to receive and what fields they want to include in data packets,<\/p><p>The client will then receive another status message along with a cache of static race data (market cache)<\/p><p>The client will then receive a heartbeat every 10 seconds (if race data has not been sent) and race packets when they are available, at the rate their account permits.<\/p><p>The message can be zipped by including the flag gzip=1 onto the initial connection URL\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-02262a9 elementor-widget elementor-widget-image\" data-id=\"02262a9\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.19.0 - 26-02-2024 *\/\n.elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=\".svg\"]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block}<\/style>\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.tpd.zone\/wp-content\/plugins\/documentation\/images\/data-flow.png\" title=\"\" alt=\"\" loading=\"lazy\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9049685 elementor-widget elementor-widget-heading\" data-id=\"9049685\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-large\">Stream Data Usage<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6c62e46 elementor-widget elementor-widget-text-editor\" data-id=\"6c62e46\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The packet data is supplied in a JSON format and is subject to additional fields being added. Your parsing method must be able to cope with this.\u00a0<\/p><p>The data is then used by your application to display data. It must not be used to store and save racing data either on your clients application or your own servers. Historical data for commercial use is available via a separate data licence.<\/p><p>Vendors have access to a historical data feed for testing applications without having to wait for live races. This feed is accessed via: wss:\/\/stream.tpd.zone\/realtime_1.3 and has extra connection response data as described later.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Connecting to the Stream Connection is made via a web socket at wss:\/\/stream.tpd.zone\/realtime_1.3 A response is received with a status message, message and connection id if successful. The client must then request a race within 4 seconds of the initial connection. This message includes your streaming Vendor Key, the clients own paid for access Client [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"parent":3017,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"acf":[],"_links":{"self":[{"href":"https:\/\/www.tpd.zone\/rest\/wp\/v2\/pages\/3021"}],"collection":[{"href":"https:\/\/www.tpd.zone\/rest\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.tpd.zone\/rest\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.tpd.zone\/rest\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tpd.zone\/rest\/wp\/v2\/comments?post=3021"}],"version-history":[{"count":20,"href":"https:\/\/www.tpd.zone\/rest\/wp\/v2\/pages\/3021\/revisions"}],"predecessor-version":[{"id":3062,"href":"https:\/\/www.tpd.zone\/rest\/wp\/v2\/pages\/3021\/revisions\/3062"}],"up":[{"embeddable":true,"href":"https:\/\/www.tpd.zone\/rest\/wp\/v2\/pages\/3017"}],"wp:attachment":[{"href":"https:\/\/www.tpd.zone\/rest\/wp\/v2\/media?parent=3021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}