forked from xsf/xeps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xep-0067.xml
201 lines (185 loc) · 8.03 KB
/
xep-0067.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM "xep.ent">
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Stock Data Transmission</title>
<abstract>This document specifies a data format for stock data distribution in the Jabber community.</abstract>
&LEGALNOTICE;
<number>0067</number>
<status>Deferred</status>
<type>Standards Track</type>
<sig>Standards</sig>
<dependencies><spec>XEP-0060</spec></dependencies>
<supersedes/>
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
<author>
<firstname>Ulrich</firstname>
<surname>Staudinger</surname>
<email>chicago5@gmx.de</email>
<jid>uls@jabber.org</jid>
</author>
<revision>
<version>0.3</version>
<date>2003-07-19</date>
<initials>uls</initials>
<remark>Added transmission in messages</remark>
</revision>
<revision>
<version>0.2</version>
<date>2003-01-26</date>
<initials>uls</initials>
<remark>Added ISO-8601 time scheme, added symbols, fixed typos.</remark>
</revision>
<revision>
<version>0.1</version>
<date>2003-01-12</date>
<initials>uls</initials>
<remark>Initial Release</remark>
</revision>
</header>
<section1 topic='Introduction'>
<p>
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.
</p>
<p>
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.
</p>
<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.
</p></section1>
<section1 topic="Realtime data distribution">
<p>
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.
</p>
<example caption='Component distributes realtime share value ticker data'><![CDATA[
<iq from='stockgate@way.com' to='publish@gate.way' type='set' id='publish1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='stocks/WEB2T.DE/realtime'>
<item id='some'>
<realtime>
<symbol>web2t.de</symbol>
<name>Web.de Xetra</name>
<time>04-06-2002T12:12:12</time>
<value>0.57</value>
<volume>10000</volume>
<bid>0.56</bid>
<ask>0.60</ask>
<bidsize>-1</bidsize>
<asksize>-1</asksize>
</realtime>
</item>
</publish>
</pubsub>
</iq>
]]></example>
<example caption='A client recieves realtime stock value data'><![CDATA[
<iq from='stockgate@way.com' to='publish@gate.way' type='set' id='publish1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='stocks/WEB2T.DE/realtime'>
<item id='some'>
<realtime>
<symbol>web2t.de</symbol>
<name>Web.de Xetra</name>
<time>04-06-2002T19:12:12</time>
<value>0.57</value>
<volume>10000</volume>
<bid>0.56</bid>
<ask>0.60</ask>
<bidsize>1000</bidsize>
<asksize>2000</asksize>
</realtime>
</item>
</publish>
</pubsub>
</iq>
]]></example>
<example caption="A client recieves data in a message chunk">
<![CDATA[
<message from='cerberus@jabber.org'>
<x xmlns='http://www.jabber.org/jeps/jep-0067.html'>
<realtime>
<symbol>^GDAXI</symbol>
<name>DAX</name>
<time>07-07-2003T12:00:00</time>
<value>3200</value>
<bid>-1</bid>
<ask>-1</bid>
<bidsize>-1</bidsize>
<asksize>-1</asksize>
</realtime>
</x>
</message>
]]>
</example>
</section1>
<section1 topic="Distribution of barchart, time framed stock value data ">
<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>
<p>If a value is not available, the value MUST be set to '-1'. </p>
<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.
</p>
<p>
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.
</p>
<example caption='Component distributes realtime barcharted share value ticker data'><![CDATA[
<iq from='stockgate@way.com' to='publish@gate.way' type='set' id='publish1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='stocks/WEB2T.DE/bar/0:0:0:0:15:0'>
<item id='some'>
<bar>
<symbol>web2t.de</symbol>
<name>Web.de Xetra</name>
<time>04-06-2002T19:01:00</time>
<timespan>0:0:0:0:15:0</timespan>
<open>0.52</open>
<hi>0.8</hi>
<low>0.2</low>
<close>0.51</close>
<volume>10000</volume>
</bar>
</item>
</publish>
</pubsub>
</iq>
]]></example>
<p>
Similar to section 2, timeframed data MAY be transmitted in a message element.
</p>
</section1>
<section1 topic="Distribution of share/stock specific news">
<p>
Another important part in a stock system is distribution of stock/share specific news.
</p>
<p>
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.
</p>
<example caption='Component publishes share/stock specific news'><![CDATA[
<iq from='stockgate@way.com' to='publish@gate.way' type='rset' id='publish1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='stocks/WEB2T.DE/news'>
<item id='some'>
<stocknews>
<symbol>web2t.de</symbol>
<time>04-06-2002T21:10:00</time>
<subject>Web.de looses employees</subject>
<body>Web.de looses 99% of all employees! Employees went on strike and did a collective quit.</body>
<source>Web.de PR</source>
</stocknews>
</item>
</publish>
</pubsub>
</iq>
]]></example>
</section1>
<section1 topic="Known implementations">
<p>
Greenthumb (http://greenthumb.jabberstudio.org) supports reception of stock ticker data.
</p>
<p>
The 'StockComponent' (http://www.die-horde.de) is a partial component implementation.
</p>
</section1>
</xep>