MDDL: Market Data Definition Language search:
FISD/SIIA
The XML specification to enable the interchange of information necessary to account, to analyze, and to trade financial instruments of the world's markets.
FISD HOME CONTACT SEARCH LOGIN

Sample Fragments
Samples are the small bits of examples showing the implementation of MDDL-specific XML. The W3C XML website may be useful (specifically the section on datatypes here: W3C XML datatypes). See also Examples.

Examples showing the use of base types:

Boolean:
<mdBoolean>true</mdBoolean>
<mdBoolean>0</mdBoolean>
mdBoolean may contain any legal value as defined by the W3C Schema type xsd:boolean.

DateTime:
<mdDateTime>2001-11-02T16:20:21Z</mdDateTime>
<mdDateTime>T16:20:21+02:00</mdDateTime>
mdDateTime may contain any legal value as defined by the W3C Schema types xsd:date, xsd:dateTime, or xsd:time.

Decimal:
<mdDecimal>123</mdDecimal>
<mdDecimal>-2.46</mdDecimal>
<mdDecimal>1.37e2</mdDecimal>
mdDecimal may contain any legal value as defined by the W3C Schema type xsd:decimal.

Duration:
<mdDuration>P1Y3DT6H</mdDuration>
mdDuration may contain any legal value as defined by the W3C Schema type xsd:duration. This example specifies a period of 1 year, 3 days, and 6 hours.

Enumeration:
<currency>USD</currency>
<currency scheme="http://www.mddl.org/ext/scheme/iso4217-alpha-3.xml">
<mdString>USD</mdString></currency>
An Enumeration is implemented as an mdString where the values are restricted by the defined scheme. The first example shows the normal shorthand for representing items from controlled vocabularies (in this case one where a default scheme is defined). The second shows the equivalent fully expanded.

NonNegativeDecimal:
<mdNonNegativeDecimal>839</mdNonNegativeDecimal>
mdNonNegativeDecimal is an mdDecimal that may only contain values that are 0 or greater.

String:
<mdString>house</mdString>
<mdString xml:lang="es">casa</mdString>
mdString is the container for all text or string based content and is governed by xsd:string. Multiple xml:lang augmented mdString elements can be provided assuming no two mdString elements has the same value for xml:lang. If no language is specified, U.S. English is assumed.

URI:
<mdURI>../../name</mdURI>
Any valid URI (as defined by xsd:anyURI) may be placed inside the element mdURI including XLink or XPointer configurations.


Examples showing the use of Controlled Vocabularies:

Internal CV

<amountOutstanding>
   <mdDecimal>23.04</mdDecimal>
   <amountOutstandingType>float<amountOutstandingType>
</amountOutstanding>
Float is of the value belonging to the controlled vocabulary amountOutstandingType.

External CV

<marketIdentifier>
   <code scheme="http://mddl.org/ext/scheme/iso10383.xml">
      <mdString>XNSE</mdString>
   </code>
</marketIdentifier>
The scheme represents a controlled vocabulary for Exchange Names, the value XNSE is obtained from this CV.


Example MDDL Instance documents

This example shows the snapshot of a stock traded during a day on NSE.

<?xml version = "1.0" encoding = "UTF-8"?>
<mddl version="2.5-beta" xmlns="http://www.mddl.org/mddl/2.5-beta"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mddl.org/mddl/2.5-beta mddl-2.5-beta.xsd">
<header>
<dateTime>2006-09-04</dateTime>
<source>NSEIndia</source>
</header>
<snap>
<equityDomain>
<commonClass>
<currency scheme="http://www.mddl.org/ext/scheme/iso4217-alpha-3.xml">
<mdString>INR</mdString>
</currency>
<instrumentIdentifier>
<code scheme="http://www.mddl.org/ext/scheme/iso6166.xml">
<mdString>ACC</mdString>
</code>
<marketIdentifier>
<code scheme= "http://mddl.org/ext/scheme/iso10383.xml">
<mdString>XNSE</mdString>
</code>
</marketIdentifier>
</instrumentIdentifier>
<trade>
<open>915</open>
<high>925</high>
<low>915</low>
<close>
<mdDecimal>
920.6</mdDecimal>
<closeType>
trade</closeType>
</close>
<last>
919</last>
<change>
<mdDecimal>
6.75</mdDecimal>
<changeType>previousClose</changeType>
</change>
<size>
<mdDecimal>
436994</mdDecimal>
</size>
<volume>
<quantityType>
items</quantityType>
</volume>
</trade>
</commonClass>
</equityDomain>
</snap>
</mddl>


This example shows two sequential events reporting the last trade.

<mddl version="1.0-final" xmlns="http://www.mddl.org/mddl/2001/1.0-final">
<header>
<dataDateTime>2001-11-02T16:47:04Z</dataDateTime>
<source>Your Data Provider</source>
</header>
<timeseries>
<instrumentIdentifier>
<name>Some Hong Kong Company</name>
<code scheme="http://www.ypd.net/XML/scheme/ydpSymbols.xml">
<mdString>HKSE-XC2</mdString>
<nameRef>../../name</nameRef>
</code>
</instrumentIdentifier>
<exchangeIdentifier>
<code scheme
="http://www.ypd.net/XML/scheme/ydpExchanges.xml" >HKSE</code>
</exchangeIdentifier>
<currency>
HKD</currency>
<dataDateTime>2001-11-01</dataDateTime>
<event>
<equityDomain><commonClass><trade><last>
<mdDecimal>
188.50</mdDecimal>
<dataDateTime>2001-11-01T16:20:12Z</dataDateTime>
</last></trade></commonClass></equityDomain>
</event>
<event>

<equityDomain><commonClass><trade><last>
<mdDecimal>
188.32</mdDecimal>
<dataDateTime>
2001-11-01T16:20:18Z</dataDateTime>
</last></trade></commonClass></equityDomain>
</event>
</timeseries>
</mddl>


Printer Friendly