XEP-0067: Stock Data Transmission

Abstract
This document specifies a data format for stock data distribution in the Jabber community.
Author
Ulrich Staudinger
Copyright
© 2003 – 2003 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Deferred

WARNING: This document has been automatically Deferred after 12 months of inactivity in its previous Experimental state. Implementation of the protocol described herein is not recommended for production systems. However, exploratory implementations are encouraged to resume the standards process.
Type
Standards Track
Version
0.3 (2003-07-19)
Document Lifecycle
  1. Experimental
  2. Deferred
  3. Proposed
  4. Stable
  5. Final

1. Introduction

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.

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.

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.

2. Realtime data distribution

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.

Example 1. Component distributes realtime share value ticker data
<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 2. A client recieves realtime stock value data
<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 3. A client recieves data in a message chunk

<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>


3. Distribution of barchart, time framed stock value data

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.

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. 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.

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.

Example 4. Component distributes realtime barcharted share value ticker data
<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>

Similar to section 2, timeframed data MAY be transmitted in a message element.

4. Distribution of share/stock specific news

Another important part in a stock system is distribution of stock/share specific news.

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.

Example 5. Component publishes share/stock specific news
<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>

5. Known implementations

Greenthumb (http://greenthumb.jabberstudio.org) supports reception of stock ticker data.

The 'StockComponent' (http://www.die-horde.de) is a partial component implementation.


Appendices

Appendix A: Document Information

Series
XEP
Number
0067
Publisher
XMPP Standards Foundation
Status
Deferred
Type
Standards Track
Version
0.3
Last Updated
2003-07-19
Approving Body
XMPP Council
Dependencies
XEP-0060
Supersedes
None
Superseded By
None
Short Name
NOT_YET_ASSIGNED
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Ulrich Staudinger
Email
chicago5@gmx.de
JabberID
uls@jabber.org

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".

Appendix G: Notes

Appendix H: Revision History

Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/

  1. Version 0.3 (2003-07-19)
    Added transmission in messages
    uls
  2. Version 0.2 (2003-01-26)
    Added ISO-8601 time scheme, added symbols, fixed typos.
    uls
  3. Version 0.1 (2003-01-12)
    Initial Release
    uls

Appendix I: Bib(La)TeX Entry

@report{staudinger2003xep0067,
  title = {Stock Data Transmission},
  author = {Staudinger, Ulrich},
  type = {XEP},
  number = {0067},
  version = {0.3},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0067.html},
  date = {2003-01-12/2003-07-19},
}

END