No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0067.xml 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM "xep.ent">
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Stock Data Transmission</title>
  10. <abstract>This document specifies a data format for stock data distribution in the Jabber community.</abstract>
  11. &LEGALNOTICE;
  12. <number>0067</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies><spec>XEP-0060</spec></dependencies>
  17. <supersedes/>
  18. <supersededby/>
  19. <shortname>NOT_YET_ASSIGNED</shortname>
  20. <author>
  21. <firstname>Ulrich</firstname>
  22. <surname>Staudinger</surname>
  23. <email>chicago5@gmx.de</email>
  24. <jid>uls@jabber.org</jid>
  25. </author>
  26. <revision>
  27. <version>0.3</version>
  28. <date>2003-07-19</date>
  29. <initials>uls</initials>
  30. <remark>Added transmission in messages</remark>
  31. </revision>
  32. <revision>
  33. <version>0.2</version>
  34. <date>2003-01-26</date>
  35. <initials>uls</initials>
  36. <remark>Added ISO-8601 time scheme, added symbols, fixed typos.</remark>
  37. </revision>
  38. <revision>
  39. <version>0.1</version>
  40. <date>2003-01-12</date>
  41. <initials>uls</initials>
  42. <remark>Initial Release</remark>
  43. </revision>
  44. </header>
  45. <section1 topic='Introduction'>
  46. <p>
  47. Usage of jabber/xmpp for stock data transmission would be a nice-to-have. This xep defines transmission of stock ticker values via XMPP based on publish/subscribe. A component, client or alike may publish stock data in this specified way, after creating a node. However, first of all a node on the pub/sub server must be created, this xep recommends creation of the node in the domain 'stocks/', with specific stock value published in the ticker name domain space, i.e. 'stocks/CATG.DE' or 'stocks/602345'. This xep uses the domain 'stocks/' for example data.
  48. </p>
  49. <p>
  50. So, what this document comes down to: it defines the data architecture for stock data and it specifies, that a 'stocks/' node is recommended to exist, which again holds all symbols as subnodes, which again hold either '/realtime', '/bar' or '/news' as subnodes. The 'bar' subnode contains a 'time descriptor' subnode. The sort of the symbols is defined through the service provider, who can i.e. support Y!ahoo finance symbols, (german) WKNs or official stock symbols.
  51. </p>
  52. <p>In a non pubsub environment stock data SHALL be transmitted in the x-chunk, identified with the namespace 'http://www.jabber.org/jeps/jep-0067.html', embedded into a message chunk.
  53. </p></section1>
  54. <section1 topic="Realtime data distribution">
  55. <p>
  56. Realtime (or close-to-realtime) full stock value data is distributed to a ticker symbol pub/sub location, in the stocks domain. The share data SHALL contain name, time of last trade, most recent stock value, last trade volume, bid, ask, bid size, ask size of the share. If a value is not available, the value MUST be set to '-1'. Each of the values is transmitted in a corresponding xml element, as seen below. The data is published to a pub/sub position. Realtime share value SHALL be published to a position 'realtime' in the ticker symbol domain.
  57. </p>
  58. <example caption='Component distributes realtime share value ticker data'><![CDATA[
  59. <iq from='stockgate@way.com' to='publish@gate.way' type='set' id='publish1'>
  60. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  61. <publish node='stocks/WEB2T.DE/realtime'>
  62. <item id='some'>
  63. <realtime>
  64. <symbol>web2t.de</symbol>
  65. <name>Web.de Xetra</name>
  66. <time>04-06-2002T12:12:12</time>
  67. <value>0.57</value>
  68. <volume>10000</volume>
  69. <bid>0.56</bid>
  70. <ask>0.60</ask>
  71. <bidsize>-1</bidsize>
  72. <asksize>-1</asksize>
  73. </realtime>
  74. </item>
  75. </publish>
  76. </pubsub>
  77. </iq>
  78. ]]></example>
  79. <example caption='A client recieves realtime stock value data'><![CDATA[
  80. <iq from='stockgate@way.com' to='publish@gate.way' type='set' id='publish1'>
  81. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  82. <publish node='stocks/WEB2T.DE/realtime'>
  83. <item id='some'>
  84. <realtime>
  85. <symbol>web2t.de</symbol>
  86. <name>Web.de Xetra</name>
  87. <time>04-06-2002T19:12:12</time>
  88. <value>0.57</value>
  89. <volume>10000</volume>
  90. <bid>0.56</bid>
  91. <ask>0.60</ask>
  92. <bidsize>1000</bidsize>
  93. <asksize>2000</asksize>
  94. </realtime>
  95. </item>
  96. </publish>
  97. </pubsub>
  98. </iq>
  99. ]]></example>
  100. <example caption="A client recieves data in a message chunk">
  101. <![CDATA[
  102. <message from='cerberus@jabber.org'>
  103. <x xmlns='http://www.jabber.org/jeps/jep-0067.html'>
  104. <realtime>
  105. <symbol>^GDAXI</symbol>
  106. <name>DAX</name>
  107. <time>07-07-2003T12:00:00</time>
  108. <value>3200</value>
  109. <bid>-1</bid>
  110. <ask>-1</bid>
  111. <bidsize>-1</bidsize>
  112. <asksize>-1</asksize>
  113. </realtime>
  114. </x>
  115. </message>
  116. ]]>
  117. </example>
  118. </section1>
  119. <section1 topic="Distribution of barchart, time framed stock value data ">
  120. <p>Time framed, suitable for barcharts/candle sticks/line diagram, stock value data is distributed to a pub/sub location, the ticker symbol domain in the stocks domain. The share data SHALL contain name, validity time of this data set, open, hi, low, close for this time frame, traded volume in this time span of a share. </p>
  121. <p>If a value is not available, the value MUST be set to '-1'. </p>
  122. <p>Each of the values is transmitted in a corresponding xml element, as seen below. The data is published to a pub/sub position. Time framed, barcharted share data SHALL be published to a position 'bar' in the ticker symbol domain, the subdomain of this position SHALL be the time span information, time span as stated below. It is up to a component, how to to react on subscriptions in various time spans. Implementations are advised to generate data as according to subscribers demands (subscriptions). Values lower than 0:0:0:0:5:0 are not suitable for most implementations.
  123. </p>
  124. <p>
  125. The time span SHALL be represented as a string, composed of the amount of years, months, days, hours, minutes, seconds covered by this barchart data set. Time span values SHALL be separated from each other through ':'. A leading zero MAY be attached to digits lower than ten.
  126. </p>
  127. <example caption='Component distributes realtime barcharted share value ticker data'><![CDATA[
  128. <iq from='stockgate@way.com' to='publish@gate.way' type='set' id='publish1'>
  129. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  130. <publish node='stocks/WEB2T.DE/bar/0:0:0:0:15:0'>
  131. <item id='some'>
  132. <bar>
  133. <symbol>web2t.de</symbol>
  134. <name>Web.de Xetra</name>
  135. <time>04-06-2002T19:01:00</time>
  136. <timespan>0:0:0:0:15:0</timespan>
  137. <open>0.52</open>
  138. <hi>0.8</hi>
  139. <low>0.2</low>
  140. <close>0.51</close>
  141. <volume>10000</volume>
  142. </bar>
  143. </item>
  144. </publish>
  145. </pubsub>
  146. </iq>
  147. ]]></example>
  148. <p>
  149. Similar to section 2, timeframed data MAY be transmitted in a message element.
  150. </p>
  151. </section1>
  152. <section1 topic="Distribution of share/stock specific news">
  153. <p>
  154. Another important part in a stock system is distribution of stock/share specific news.
  155. </p>
  156. <p>
  157. Stock news are distributed to the pub/sub gateway, to the 'news' location in the ticker symbol subdomain. The stock news are packed in a 'stocknews' chunk. The stocknews chunk contains time, subject, body and source of these news.
  158. </p>
  159. <example caption='Component publishes share/stock specific news'><![CDATA[
  160. <iq from='stockgate@way.com' to='publish@gate.way' type='rset' id='publish1'>
  161. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  162. <publish node='stocks/WEB2T.DE/news'>
  163. <item id='some'>
  164. <stocknews>
  165. <symbol>web2t.de</symbol>
  166. <time>04-06-2002T21:10:00</time>
  167. <subject>Web.de looses employees</subject>
  168. <body>Web.de looses 99% of all employees! Employees went on strike and did a collective quit.</body>
  169. <source>Web.de PR</source>
  170. </stocknews>
  171. </item>
  172. </publish>
  173. </pubsub>
  174. </iq>
  175. ]]></example>
  176. </section1>
  177. <section1 topic="Known implementations">
  178. <p>
  179. Greenthumb (http://greenthumb.jabberstudio.org) supports reception of stock ticker data.
  180. </p>
  181. <p>
  182. The 'StockComponent' (http://www.die-horde.de) is a partial component implementation.
  183. </p>
  184. </section1>
  185. </xep>