0% found this document useful (0 votes)
11 views55 pages

Bonds and Derrivatives MITS Market Data API

Uploaded by

Goo Ninja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views55 pages

Bonds and Derrivatives MITS Market Data API

Uploaded by

Goo Ninja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

MITS

Exchange System
Interface Specification
Information Subscribers

Created by: A Murrell


Reviewed by: L van Wyk
Approved by: L Bonthuys
Date: 21 August 2019
Version: Ver.02 Rev.14
Table of Contents
1. References ............................................................................................................. 4
2. Version Control ...................................................................................................... 4
3. Disclaimer and Copyright Notice .......................................................................... 5
4. Intended Audience ................................................................................................. 6
5. System Description ............................................................................................... 6
5.1 Introduction ........................................................................................................... 6
5.2 Connecting to a market ......................................................................................... 6
5.3 TCP/IP Transport System ..................................................................................... 6
5.4 Field Formats........................................................................................................ 7
5.5 Message Headers................................................................................................. 7
5.6 Compression ........................................................................................................ 9
5.7 Large Data Transmission .....................................................................................10
5.8 Subscription to Instrument Update Messages ......................................................10
5.9 Acknowledgement of messages ..........................................................................10
5.10 Complex Instruments........................................................................................11
5.11 Process Flow ....................................................................................................11
5.12 Market Data levels on 59 and 99 messages .....................................................14
5.13 Servicing message from TCP IP .......................................................................14
5.14 Anonymous Trading .........................................................................................14
5.15 Note for receiving and processing Price Contributions ......................................14
5.16 Market Shard Implementation ...........................................................................15
5.17 I’m Alive ............................................................................................................15
5.18 Market Encryption Key .....................................................................................15
6. Data Sources .........................................................................................................16
6.1 Historical Data .....................................................................................................16
6.2 Error and Information Messages ..........................................................................16
6.3 123 Messages vs. 36 Messages ..........................................................................16
6.4 Market Display data .............................................................................................17
6.5 Entity Codes ........................................................................................................17
6.6 Contract Convention ............................................................................................17
7. Input Messages .....................................................................................................19
7.1 Connection Messages .........................................................................................19
7.2 Subscription Messages ........................................................................................20
7.3 Request data retrieval ..........................................................................................22
7.4 Request Daily Trend - Message Type 61 .............................................................23
7.5 Heart Beats – Message Type 84..........................................................................23
8. Output Messages ..................................................................................................24

MITS – Exchange System Page 2 of 55


Interface Specification
8.1 Session key Challenge - Message 16 ..................................................................24
8.2 Successful log in response – Message 1 .............................................................24
8.3 Display/Price Update Message - Message Type 59\99 ........................................25
8.4 Exchange Announcements – Message 125 .........................................................28
8.5 Business Message Reject – Message 132...........................................................29
8.6 Daily Trend Reply – Message 61 .........................................................................29
8.7 Heart Beat – Message 10 ....................................................................................29
8.8 Indices Service ....................................................................................................30
8.9 Failure Messages ................................................................................................30
8.10 Completed Trade – Message 58.......................................................................32
9. Download Data Structures ...................................................................................33
9.1 Request Data Header – Message Type 36 and 123 ............................................33
9.2 Instruments Data – Number 2 ..............................................................................34
9.3 Instrument Types – Number 39............................................................................36
9.4 Contract Dates – Number 3 .................................................................................37
9.5 Strike Data – Number 4 .......................................................................................39
9.6 MTM Data – Number 16 ......................................................................................40
9.7 Holiday Data – Number 18 ...................................................................................41
9.8 Market Display Data – Number 1 .........................................................................41
9.9 Member Data – Number 15 .................................................................................42
9.10 Clearing Member Data – Number 65 ................................................................42
9.11 Exchange Announcements – Number 89 .........................................................42
9.12 News Service – Number 129 ............................................................................43
9.13 Coupon Information – Number 131 ...................................................................43
9.14 Trading Sessions – Number 136 ......................................................................44
9.15 Indices Data – Number 138 ..............................................................................45
9.16 Indices Price Data – Number 137 .....................................................................45
9.17 Shares in Issue Data – Number 141 .................................................................46
9.18 Index Data – Number 146.................................................................................46
9.19 Index Constituents Data – Number 147 ............................................................46
10. Error and Information Messages .........................................................................47
10.1 Information Message ........................................................................................47
10.2 Error Messages ................................................................................................48
11. Glossary ................................................................................................................55

MITS – Exchange System Page 3 of 55


Interface Specification
1. References

Document Author Version Issue Date

Please note that documents could take the form of discussions, interviews, presentations, workshops,
white papers etc.

2. Version Control

Version Author Date Reason for Changes


Ver.02 Rev.01 A.Murrell 16 May 2014 Updated to next generation API
Ver.02 Rev.03 A Murrell 7 January 2016 Updated Contract Dates download data (pg
36)
Updated Holiday Data download (pg 37)
Updated Indices Data download (pg 41)
Added Shares in Issue Download (pg 42)
Updated Trading Sessions Data (pg 41)
Ver.02 Rev .04 A Murrell 4 April 2016 Updated Indices message (pg 28)
Updated Member data (pg 38)
Updated instruments data (pg 33)
PLEASE NOTE CHANGES TO:
Market Data Subscription (Message Type
99) Workflow now responds with Display
Update Message with a message type of
99. (pg 24),
Live Display Update Messages (Message
Type 59) are no longer compressed. (pg 9)
Intraday Data Updates (Message Type 123)
are no longer compressed. (pg 30)
Ver.02 Rev .05 H Shibambo 27 September 2016 Updated Depth message(pg 24)
Updated Instrument download (pg 33)
Updated Indices Data download (pg 41)
Added Index Data download (pg 42)
Added Index Constituents download (pg 42)
Ver.02 Rev.06 W Pelser 13 December 2016 Updated Contact Status (pg 26)
Updated Contract Date (pg 37)
Ver.02 Rev.07 H Potgieter 23 March 2018 Updated Depth message (pg 25)
Ver.02 Rev.08 T.Koole 09 May 2018 Added Completed Trade message (pg 32)
Ver.02 Rev.09 C Marais 03 October 2018 Updated Depth message (pg 25)
Ver.02 Rev.10 C Marais 22 October 2018 Added Commodity to: 6.6 Contract
Convention (pg 18)
Ver. 02 Rev.11 Q Erasmus 13 August 2019 Fixed Total Length on 9.2 Instrument Data
(pg 36)
Swapped Security Type and Sector on 9.2
Instrument Data (pg 36)
Ver. 02 Rev.12 Q Erasmus 14 August 2019 Removed IdMarketShard from Exchange
Announcement (pg 42)

MITS – Exchange System Page 4 of 55


Interface Specification
Version Author Date Reason for Changes
Ver. 02 Rev.13 F Makhubele 15 August 2019 Fixed Total Length on 7.2.3 Future Contract
Subscription – Message Type 99 (pg 21).
Added “Is Delta Option” and Fixed Total
Length on 8.10.2 Order Contract (pg 33).
Added Total length and correct length for
“Pair Member codes with unique number"
on 8.2 Successful log in response (pg
24).
Added the correct length for "Unused" on
1.1.1 Display Update (pg 26).
Added the length for History suffix on 1.1.1
Display Update (pg 29).
Changed the index name to be “Index
sequence number” and added the length on
8.8.2 Indices Message (pg 30).
Added Good Till Cancelled Allowed on 9.4
Contract Dates (pg 37).
Added High Price, Low price, Days Volume,
Shares in Issue, Open Price and Previous
Close Price on 9.6 MTM Data (pg 40).
Removed IdMarket Shard and number from
9,12 News Service (pg 43)
Ver. 02 Rev.14 F Makhubele 15 August 2019 Corrected the length for the unused on
8.3.1 Display Update Message (pg 25).

3. Disclaimer and Copyright Notice

The information contained in this document is the property of Securities and Trading Technology (Pty)
Ltd (STT from now on). This information is issued in confidence and must not be reproduced in whole
or in part or given or communicated to any third party without the prior written consent of STT.

Any advice given or statements or recommendations made shall not in any circumstances constitute or
be deemed to constitute a warranty by STT as to the accuracy of such advice, statements or
recommendations. STT shall not be liable for any loss, expense, damage or claim arising from advice
given or not given or statements made or omitted in connection with this document.

When product names known to be trademarks of STT and other companies appear in this document,
they are used purely for informational purposes and to the benefit of their respective trademark holders.

© Copyright Securities and Trading Technology (Pty) Ltd 2013.

MITS – Exchange System Page 5 of 55


Interface Specification
4. Intended Audience

This document is intended for review by the relevant internal departments within the exchange as well
as external/market review by:

• Public Information Subscribers;


• Software Providers

5. System Description

5.1 Introduction
The Exchange Trading System is an exchange layer of markets that allow for the trading and
dissemination of multiple product types using one system, through a common Application Program
Interface (API). These products can be diverse, each containing their own set of values. Products are
further separated into different markets.

Products do contain links between them to facilitate the trading of spreads and switches (also called
splits).

5.2 Connecting to a market


The system consists of several server programs. A set of server programs constitutes a market. Each
market has an interface which allows external systems to communicate with it. The protocol used to
interface to the system is TCP/IP. Each market may have its own IP Address and Port number.

The programmer who wishes to use this API specification must first ensure that they can establish a
streamed TCP/IP permanent socket connection to the appropriate port.

From this point onwards, all communication is done using message packets. Every message packet,
either in or out, must carry a Transport Header, which consists of 4 bytes. A description of the transport
header can be found in Table 1: Transport Header

The transport header is followed by a Message Header. The message header contains the indication
of who the user is, the details of the transaction performed, etc. A description of the Message Header
can be found in Table 2: Message Header

5.3 TCP/IP Transport System


The TCP/IP transport system may or may not send a message in its entirety. Due to the nature of the
routers, carriers, etc., it is likely that in some cases a message that consists of a large number of bytes
is transmitted in smaller pieces, the length of each being random. The API programmer must ensure
the receipt of not only a complete and valid transport header, but also a complete number of message
bytes before acting on the contents of the message.

MITS – Exchange System Page 6 of 55


Interface Specification
5.4 Field Formats
Throughout the document the following field types will be referred to:
• I: Intel Integer format; the length is defined
• U: Intel unsigned integer; the length is defined
• D: Intel/IEEE floating point; 8 byte format
• P: Pascal type string with leading length byte, maximum length is the defined length – 1. All
strings are represented in this manner.
Example:
A string representation of the word MITS into a 6 long field would be sent in the following
manner:
0 1 2 3 4 5

4 M I T S

The system will validate the string only in this context using the byte 0 as the length.
• B: The field is made up of 1 or more bytes of type U
• C: Single character; ASCII equivalent

A field description will also be given which describes the contents:


• A: Alpha only
• N: Numeric only - Default for types I.U.D
• AN: Alphanumeric

Time Format
• All times given in this document are given as 4 byte values in the following format:
Byte 0 = Hours
Byte 1 = Minutes
Byte 2 = Seconds
Byte 3 = 0
Date Format
• All Dates given in this document are 12 byte values which are provided as 3 integer values
representing:
Year
Month
Day
Please Note: Mandatory fields in this specification are market with an asterisk (*). All non-mandatory
fields which are not going to be filled in should be sent with 0 for numeric values, and empty strings or
padded with null (0) for alpha fields.

5.5 Message Headers


Table 1: Transport Header

Name Length Comment


Byte 1* 1 255 or FF

MITS – Exchange System Page 7 of 55


Interface Specification
Byte 2* 1 Low byte of the message length (not including the 4 byte
transport header)
Byte 3* 1 High byte of the message length (not including the 4 byte
transport header)
Byte 4* 1 XOR of bytes 2 and 3
Total Length 4

Table 2: Message Header

Name Length Type Description Case Example Comment


Sequence 4 I N n/a 123 Used for message
Number trace purposes. This is
a sequence number
per socket and is
incremented with each
message sent.
User Name* 16 P AN U ABMN This is the user name
as assigned to you by
the exchange.
User Number* 4 I N n/a 66 Any user integer. This
is kept by the system
and returned to the
user unchanged.
Time* 4 B N n/a 11, 56, 55, 0 Time Format:
Hours, Minutes,
Seconds, 0
Message Type* 1 B N n/a 36 Message Number.
Total Length 29
Bytes

Data in the message portion of the packet will then follow the Message Header.

Name Length Type Description Case Example Comment


Message MAX - B AN n/a Defined or compressed
5471 message.

The messages are defined in two groups:


• Input Messages sent by the API user.
• Output Messages sent to the API user.

These defined groups contain message types that can be defined into two further groups:
• Private Messages
o These are messages that contain confidential information that is specific for an
individual dealer or an individual member firm. An example of this is the 123 Message
with deal update/insert indicator.
• Public messages
o These are non-confidential messages that contain information that is market specific
and available to all users who subscribe to public data. For example: a last price change
on a contract would be received by the whole market. Information Subscribers will be
key users of these messages.

MITS – Exchange System Page 8 of 55


Interface Specification
5.6 Compression
A large number of the messages contain data which is considered amenable to compression. Therefore,
this data is compressed using the GZIP algorithm. The data contains a GZIP header defining the
decompression criteria, and once a complete compressed data string of bytes has been received, it
must be decompressed. The structure of the DECOMPRESSED data is given in this document.

Details of the GZIP decompression algorithm can be found at the following URL:

http://www.gzip.org/
https://www.gnu.org/software/gzip/

A .Net sample is provided below:

public static class GZip


{
public static byte[] Compress(byte[] data)
{
byte[] unCompressed = new byte[data.Length];

Buffer.BlockCopy(data, 0, unCompressed, 0, data.Length);

using (MemoryStream inStream = new MemoryStream())


{
using (GZipStream zip = new GZipStream(inStream, CompressionMode.Compress,
true))
{
zip.Write(data, 0, data.Length);
}
inStream.Position = 0;
byte[] compressed = new byte[inStream.Length + 4];
inStream.Read(compressed, 4, compressed.Length - 4);
Buffer.BlockCopy(BitConverter.GetBytes(data.Length), 0, compressed, 0, 4);
inStream.Position = 0;
inStream.Close();
inStream.Dispose();
return compressed;

public static byte[] Decompress(byte[] data)


{
using (MemoryStream inStream = new MemoryStream())
{
int dataLength = BitConverter.ToInt32(data, 0);
inStream.Write(data, 4, data.Length - 4);
byte[] decompressed = new byte[dataLength];
inStream.Position = 0;
using (GZipStream zip = new GZipStream(inStream, CompressionMode.Decompress
))
{
zip.Read(decompressed, 0, decompressed.Length);
}
return decompressed;
}

}
}

MITS – Exchange System Page 9 of 55


Interface Specification
5.7 Large Data Transmission
Message Packet (Message Type 123 and 36)

Transport Header Message Header Message Sub Header Data Section


4 Bytes 29 Bytes 24 Bytes (Section 9.1) Max 5000 Bytes

Message Packet (Message Type 59)

Transport Header Message Header Message Sub Header Data Section


4 Bytes 29 Bytes 1 Byte (Section 8.3) Max 5000 Bytes

All Data Sections transmitted to users will have a maximum size of 5000 bytes. When the compressed
data buffer is greater than 5000 bytes the system will split this data buffer into a series of Data Sections.
These Data Sections will all have a length of 5000 bytes, except the last Data Section which will contain
the remainder of the data.

Each data section will then be sent with its own transport header, message header and message sub-
header. The message sub-header will indicate if this is the final message of a series. The data will
inevitably be in compressed format. Upon receipt of the final message, all Data Sections can be
appended and decompressed as a whole.

Only messages 36 (data retrieval), 99 (contract update) are compressed, all other messages are not
compressed.

5.8 Subscription to Instrument Update Messages


The system works on a subscriber basis for all instrument and depth updates. The user will have to
send a subscription request message to subscribe to a contract. The list of all configured and active
contracts are available through the API specification using a 36 type message (Market Display data).

In order to subscribe to a contract, the user would send a type 99 message. This message would contain
all the contracts for which the user would like to receive updates. In order to unsubscribe from a contract,
the user would send in a type 42 message. This message would contain a list of the contracts from
which the user would like to unsubscribe.

The result of sending a type 99 message is a type 59 message containing all the details of the
instruments the user subscribed to. When an order is added to the Instrument or any depth of the
instrument changes the user would receive a type 59 message on the instrument with the updated
details automatically. Thus the user only has to subscribe to the instrument once and thereafter they
would receive all updates to the instrument. This has to be done for each session.

Subscription to the Indices feed is based on a Boolean (true\false) field. This is done by sending a type
98 message with the flag set to true. In return this will send all Indices. To disable this feed after
subscription, simply send a further 98 message with the flag set to false.

5.9 Acknowledgement of messages


The system is transactional and asynchronous. This means that no ACK or NACK is sent on the
application layer to confirm the receipt of messages. Instead a transaction response is sent when a
message has been processed by the system.

There are three types of transaction responses:


• 123 Message (Data update)
This is the positive response to the transaction. The data in the message informs the user of
the data change and the action taken on the data i.e. Insert, Update or Delete.
• 59 Message (Contract update)

MITS – Exchange System Page 10 of 55


Interface Specification
This is the positive response to the transaction. The data in the message contains the updated
instrument information and depth on the instrument.
• 125 Message (Error and information messages).
These responses are either negative or positive. A list of common messages can be found in
Error and Information Messages.

In all these message types the Sequence Number in the message header is incremented by each send
to the specific socket.

5.10 Complex Instruments


Complex instruments are two contracts that are grouped together to make up one contract. The
following Complex Instruments can be traded:
• Spread
o A Spread is a contract that constitutes one instrument and two expiries.
o Example: a spread can be traded between the DEC 2007 FBWC and the FEB 2008
FBWC contracts
• Switches
o A Switch consists of 2 different instruments with the same expiry date.
o Example: a switch is contract that is traded between the DEC 2007 FBWC and DEC
2007 AAAA contracts.

5.11 Process Flow

5.11.1 The Login Process

API Application MITS System


User Establishes
TCP Connection.
Message Type 16
with daily key is
sent.
User sends Message
Type 0.
Message Type 1 OR
Message Type 125.

5.11.2 I’m Alive from MITS System

API Application MITS System


Message Type 10 is
sent at regular
intervals.

5.11.3 Heartbeat to the MITS System

API Application MITS System


User sends Message
Type 84.

5.11.4 Changing Password

MITS – Exchange System Page 11 of 55


Interface Specification
API Application MITS System
User sends Message
Type 0.
Message Type 125
is returned.

5.11.5 Requesting Data

API Application MITS System


User sends Message
Type 36
Message Type 36
OR 125 is returned.

5.11.6 Subscribing to Contract Display Updates

API Application MITS System


User sends Message
Type 99 OR 67
Message Type 59
OR Message Type
125 is returned.
Subsequent Display
Updates are sent.

5.11.7 Un-Subscribing from Contract Display Updates

API Application MITS System


User sends Message
Type 42
Display updates for
supplied contracts
will no longer be
sent. A Message
Type 125 may be
returned.

5.11.8 Re-Request of Display Updates

API Application MITS System


User sends Message
Type 3
One or more
Message Type 59
messages OR
Message Type 125
will be returned

5.11.9 Onscreen Activity

API Application MITS System


User sends Message
Type 56 OR
Message Type 8 OR
MITS – Exchange System Page 12 of 55
Interface Specification
Message Type 27
OR Message Type
85 OR Message
Type 104
The following
messages may be
returned:
Message Type 125
Message Type 123
Message Type 59

5.11.10 Report Only Activity

API Application MITS System


User sends Message
Type 29 OR Message
Type 26 OR Message
Type 30 OR Message
Type 40
One or more File
Update (123)
Message are
returned OR
Message Type 125

5.11.11 Post Deal Management Activity

API Application MITS System


User sends Message
Type 22 OR
Message Type 24
OR Message Type
31 OR Message
Type 33 OR
Message Type 62
OR Message Type
64 OR Message
Type 115
One or more File
Update (123)
Messages are
returned AND/OR
Message Type 59
OR Message Type
125

5.11.12 Entity Administration Activity

API Application MITS System


User sends Message
Type 6 OR Message
Type 7 OR Message
Type 102 OR
Message Type 109
OR Message Type
120 OR Message
Type 124

MITS – Exchange System Page 13 of 55


Interface Specification
File Update (123)
Message is returned
OR Message Type
125

5.12 Market Data levels on 59 and 99 messages


This section only applies to Information Subscriber users.

The system allows for 2 levels of subscription for the screen update message (59).

• Level 1 – Best Bid or Offer (Allows the user to only see the top of the depth)
• Level 2 – Full Depth (Allows the user to see the full depth on a contract)

These levels are set up by the Exchange on the subscription profile of the user. The message received
by the user is the same in both cases, only the number of depth items changes.

5.13 Servicing message from TCP IP


Under high amounts of volume, it is imperative that users service the messages from their TCP/IP
socket in an efficient manner. The exchange system has controls in place to ensure that users who are
not servicing messages in an efficient manner, and thus causing their queue on the communications
layer of the exchange system to build up, are disconnected to avoid a buildup of pending messages.

A recommended solution to this would be to remove messages from the socket as soon as they arrive,
and create an application resident queue of messages. This application resident queue can then be
used to process messages. This will then send acknowledgement of receipt of the message to the
exchange system as soon as messages arrive, and avoid the potential of being disconnected.

5.14 Anonymous Trading


Some instruments will be listed as anonymously traded instruments. The Contract Date download
message (Download Message Number 3) includes flags to identify the anonymously traded instruments.

The Display Update Messages (59’s) published on these instruments will be flagged as anonymous,
and the member codes previously displayed will not be published.

The member codes on these display updates will be replaced with uniquely identifiable numbers. Each
user will be assigned a number upon login, and this same number will be present in the display update
messages. This will allow users to identify their own orders in the market depth.

5.15 Note for receiving and processing Price Contributions


An instrument type has been added which will indicate the list of instruments on which price
contributions will be published. The price contribution will be published using the normal Display Update
message (Message Type 59). For example an instrument with short name “Q153” may be created to
display price contributions made on the R153 bond.
These price contributions are indicative only, and cannot be traded. Volume and Open Interest will never
be published on these instruments.

Price contributions will be identified by using the Instrument Type indicator which forms part of the
Instrument Data Download. Instruments with type number of 32 are Price Contribution Instruments. The
price contribution may, for example, have a short name of e.g. Q153 which may represent the R153
Government Bond. The mapping for this can be determined by the Display Name field on the instrument
data. For example an instrument with a short name of Q153 will have a Display Name of R153 to indicate
its relationship to the actual R153 tradable instrument.

MITS – Exchange System Page 14 of 55


Interface Specification
5.16 Market Shard Implementation
In order to cater for higher order throughput on the MITS exchange system, multiple instances of the
trading system will be deployed. As a result, multiple trading engine shards per market will host different
instruments. This has no impact to message processing for the user, besides the impact to the depth
re-request message (message type 3).

The market depth data message (Display Update Message Type 59) currently contains a Global
Sequence Number. This is a sequential message for display updates per market shard.

The depth re-request message allows the user to re-request market depth data per market shard.

The market shard number in the re-request message will identify the market sub set on which particular
contracts can be found. This will match up with the market shard number on the Instrument Data
download, and therefore Instruments can be mapped accordingly to a particular market shard.

5.17 I’m Alive


The system will transmit to the API user an ‘I’m alive’ message (message 10, Section 8.6.1). This will
only be transmitted if no message has been sent from the system to the user in the last 45 seconds, or
a pre-configured amount of time set by the Exchange.

The API user must send a Heartbeat message to the system, if there has not been a message sent
from the user in the last 45 seconds, or a pre-configured amount of time set by the Exchange.

5.18 Market Encryption Key


When the system accepts a new connection a message (type 16) will be generated and sent to the user
who established the connection. This message contains the normal headers. The data part of the
message is explained in section 7.1.1.

MITS – Exchange System Page 15 of 55


Interface Specification
6. Data Sources

Data can be requested from the system by sending a request message (See Error! Reference source n
ot found.). A series of compressed message packets will be sent to the user in response to the request.
Each of these packets will be preceded with a Transport Header, Message Header and Request Data
Header.

In the Request Data Header the Data Type defines the structure of the data. The size of the
decompressed data will be a multiple of the size of the defined structure. This decompressed data can
therefore be type cast into a series of records.

Example:
1. Request data for MTM File (Type 16)
2. Received a complete data buffer of 576 bytes (After decompression).
3. Number of records contained = Length of Decompressed Buffer (576) / Size of MTM Structure
(64) = 9
4. 9 Records returned by Download.

6.1 Historical Data


Data can be requested for the previous business day. The Data Request message contains a date
parameter, and must be set to download data for the required date.

Table 3: Possible Data Types contains a reference to data sets available for historical data retrieval.

6.2 Error and Information Messages


These messages are sent to users specifically when;
• An error occurs as a result of a message sent
• When a requested process cannot be completed,
• When the exchange wishes to make an announcement of any sort.

These messages contain an integer field indicating the error number; this is followed by a byte field
indicating if the message is an error message or an information message. These fields are followed by
the messages in text format. The exact text of the message may vary as the message may include
contract information.

(Refer to Error and Information Messages)

6.3 123 Messages vs. 36 Messages


The 123 and 36 Messages are received when downloading or receiving private and public data from
the exchange.

Updates or inserts are received intra-session with message type 123, which always contains only one
record.

When an input message 36 is sent; messages containing multiple records can be received.

MITS – Exchange System Page 16 of 55


Interface Specification
During the trading session a 123 Message (Data Update) can be received containing data type indicator
Number 1 (Market Display). This will only contain one record, an insert, update or delete for the display
data.

6.4 Market Display data


To facilitate the ease of trading, a data set is available through the API specification that contains the
entire set of contracts available for real-time trading on each market. The Market Display data contains
all relevant links of each contract. The market display data also contains the information for that contract
that is relevant for trading of the contract in the current market session.

The data set structure is available for retrieval as a Message 36 in Request Data Header – Message
Type 36 and 123.

6.5 Entity Codes


The following Entities used currently exist in the system:

• Member
- Members are 5 byte long Pascal type strings
- Example: ABCD
• Dealer
- Dealers are 4 byte long Pascal type strings
- Example: JOE
• Clients
- Clients are 7 byte long Pascal type strings. 3 Alpha, followed by 3 numeric characters
- Example: CLI001
• Sub-Accounts
- Sub-accounts are 6 byte long Pascal type strings, that do not end in ‘C’
- Example: SUB99
• Clearing Members
- Clearing members are 6 long Pascal type strings
- Clearing members always end with a character C in byte 5
- Example: ABCDC

6.6 Contract Convention


Contracts are provided as an indication on most messages what the details are of the product that is
available to trade. The contract is made up of the following definition:

Name Length Type Description Case Example Comment


Identifier 4 I A U E Defines the asset class of the
Prefix contract. See table below for
all variations.
Date 12 Date N n/a 2014, 5, Defines either the settlement
16 date of the transactions on
this contract, or the futures
expiry date in the case of
futures market transactions
Instrument 5 P AN U ALSI Defines the instrument which
Name represents this contract.
Strike 8 D N n/a 12500.00 For option contracts,
indicates the strike price.

MITS – Exchange System Page 17 of 55


Interface Specification
Call Put 1 C A U C or P For option contracts,
indicates if this is a Call or
Put option contract.
Secondary 12 Date N n/a 2014, 6, For strategy type products
Date 16 such as Repo or Calendar
Spreads, represents the date
of the second leg of the
contract.
Secondary 5 P AN U RESI For strategy type products
Instrument such as Product spreads,
Name represents the instrument
name of the second leg of the
contract.
Is Delta 1 B N n/a 1 – True, For option contracts,
Option 0 - False indicates if this is a Delta
Neutral Option strategy.

Length: 48 bytes

Identifier Prefix Definitions

Character Contract
F Future
E Equity
O Commodity
Y Option
Z Spread
X Split / Switch
G Bond
R Repo
Q Reverse Repo
W Nominal Switch
V Currency Per Point
Switch
S Swap
T Notional Swap
N Fixed Rate Derivative

MITS – Exchange System Page 18 of 55


Interface Specification
7. Input Messages

7.1 Connection Messages

7.1.1 Encryption

An asynchronous encryption method is used for connecting to the exchange. The public/private key pair
is generated on exchange. When the client connects to the server, an acknowledgement message is
sent to the client with the public key (Message Type 16). The public key will be used to encrypt the login
password only.

The encrypted password field allows for 312 bytes, and as the length of the password can vary, the
length of the encrypted password needs to be included in the first 4 bytes of the encrypted password
field. This leaves you with 308 bytes for the encrypted password itself.

Below is a C# implementation of the encryption method. You’ll need to include the


System.Security.Cryptography namespace, which contains the cryptography service provider.

public byte[] EncryptText(string text, byte[] publicKey)


{
RSACryptoServiceProvider provider = new RSACryptoServiceProvider();
string key = Encoding.ASCII.GetString(publicKey); //gets the xml
representation of the public key
provider.FromXmlString(key);

byte[] dataToEncrypt = Encoding.ASCII.GetBytes(text);


byte[] encryptedData = provider.Encrypt(dataToEncrypt, true); //the true
parameter (required) enables OAEP padding (only available on computers
running Windows XP or later)
byte[] dataLength = BitConverter.GetBytes(encryptedData.Length);
byte[] buffer = new byte[encryptedData.Length + 4];
Buffer.BlockCopy(dataLength, 0, buffer, 0, 4); //copies the length of
the encrypted password into the first 4 bytes
Buffer.BlockCopy(encryptedData, 0, buffer, 4, encryptedData.Length);
//copies the encrypted password into the buffer
return buffer;
}

7.1.2 Log in Message – Message type 0

Name Length Type Description Case Example Comment


Encrypted 312 B AN n/a “@!#%@#” See description below
password*
New 312 B AN n/a “@!#%@#” New password if the user
Password requires to change their
password
Total Length 624
Bytes

MITS – Exchange System Page 19 of 55


Interface Specification
Encrypting the password:

• The public key is used to encrypt the data, which is then sent in the Encrypted Password
field.
• Similarly, if the user wishes to change their password, they would supply the new password
encrypted with the public key.

7.1.3 Log out Message – Message Type 4

• This message does not contain any details.


• The exchange will log the user out of the market, and if “Delete Orders on Lost Connection” is
selected in the login message, all active orders on the market would be deleted.

7.1.4 Re-Request – Message Type 3

Re-Request of 59 messages. The Display Update (Message Type 59) contains the sequence
numbers required to facilitate this request. The From Sequence and To Sequence are both
inclusive in the result set. The exchange will reply in result sets of 100 sequences at a time, for
the supplied sequence number range.

When the user is disconnected, and re-connects, they are advised to re-request missing
messages starting with the last global sequence number received. This is to ensure that any
updates, to the last global sequence number received, are taken into account.

The user is also advised that live messages should be received in conjunction with the response
to re-requests. This is to avoid missing live messages whilst re-requests are being received.

It is also advised that if a sequence number is received out of order, the user should build
functionality that manages any triggers for re-request. This functionality could potentially make
use of a counter that only after 3 checks, triggers a re-request for a missing sequence number.
This will cater for the possibility that a sequence number is received out of order due to message
routing or other factors, and allow the user to ensure all data is received in good order.

The market shard number will identify the market sub set on which particular contracts can be
found. This will match up with the market shard number on the Instrument Data download, and
therefore Instruments can be mapped accordingly to a particular market shard.

Name Length Type Description Case Example Comment


From 4 I N n/a 12 From this sequence
Sequence* number.
To Sequence* 4 I N n/a 112 To this sequence number.
Market Shard 4 I N n/a 1 Indicates the market shard
Number number on which you would
like to re-request data from.
Total Length 12
Bytes

7.2 Subscription Messages

7.2.1 Unsubscribe Contract – Message Type 42

To inform the system that the user no longer wants to receive Display Updates on a particular contract,
a user must send a Message Type 42 with the list of contracts that they wish to unsubscribe from. This
message caters for up to 40 contracts per message. To unsubscribe to all options on the market, the
message can be sent with a quantity of 1 and an empty list of contracts.
MITS – Exchange System Page 20 of 55
Interface Specification
Name Length Type Description Case Example Comment
Quantity* 2 I N n/a 3 Number of contracts
to unsubscribe from.
Contracts to 40*48 Contract AN U List of List of contracts
unsubscribe* contracts names to
unsubscribe from
Total Length 1920
Bytes

7.2.2 Option Contract Subscription – Message Type 67

Sending this message type will result in the API user receiving Display Updates (Message Type 59)
on the contracts listed in the Option Contract Subscription Message.

The following scenarios are catered for:

• If the message contains the future contract – the user will be subscribed to all option strikes’
depths on the future expiry.
• If the message is empty all the options on the market on which an order has been placed, will
be subscribed to.
• If a single option is specified only this contract will be subscribed to.

When subscribing to a contract using the 67 message, further updates will be sent when activity is
recorded on that contract. To receive an initial state of the contract in terms of market statistics the
display file will contain the latest information for this contract. It is advised that the information in the
display data download is used as an initial state of the contract, and that the 67 message is used to
subscribe to further updates.

Name Length Type Description Case Example Comment


Contract 48 Contract AN U Contract See explanation above for
Name* implementation.
Total 48
Length Bytes

7.2.3 Future Contract Subscription – Message Type 99

Sending this message type will result in the API user receiving Display Updates (Message Type 59)
on the contracts listed in the Future Contract Subscription Message. Up to 40 contracts are catered
for in this message.

Name Length Type Description Case Example Comment


Quantity* 2 I N n/a 2 The number of
contracts for request.
Contracts 40*48 Contract AN U List of This field displays all
Requested For contracts the contract names
Display* that have been
requested.
Total Length 1922
Bytes

7.2.4 Option Statistics Request – Message Type 135

The Option Statistics Request allows a user to receive a Display Update (Message Type 59) which will
include information for all option contracts traded since the beginning of the trading session. Therefore
statistics included in the Display Update Message such as volume, last price, day’s high and day’s low
will be filled with the details for option contracts traded.

MITS – Exchange System Page 21 of 55


Interface Specification
The contract name field of this message should be left empty when sending this request.

Name Length Type Description Case Example Comment


Contract 48 Contract AN U See explanation above for
Name* implementation.

Note regarding subscription and global sequence number

When subscribing to an update on a contract, the resulting 59 message will contain a global sequence
number of the last global sequence number sent, and will not increment. Therefore 59 messages
received as a reply to a subscription message (message type 99) should not be used as part of any
global sequence number processing, as these updates do not fall in line with the normal sequence
number series. Any subsequent 59 messages after subscription has been processed will continue with
the normal global sequence number series.

7.3 Request data retrieval

7.3.1 Request data retrieval – Message Type 36

The Request Data Retrieval Message allows users to request data from the system. The Data Type
field indicates what type of data should be returned. To download a specific record within a data set,
the Specific Record field is filled with the sequence number of the record required. The Download Date
field allows the user to request data for a specified date. This date can only be set to today or the
previous business day. If no data is available for the request, an empty data set will be returned.

Name Length Type Description Case Example Comment


Data Type* 1 B N n/a 5 File identifier requested. See
below for list of available
types.
Unused 1 B
Last Piece 1 B N n/a 1 Not used for request.
of Chunk
Re-request 1 B N n/a True or Indicates if this is a re-request
false for data.
Action 4 I N n/a Not used for request.
Specific 4 I N n/a 4664 Allows the download of a
Record specific record sequence
number and onwards.
Download 12 Date N n/a 2014, 5, Date of day’s records which
Date* 16 must be downloaded.
Total Length 24
Bytes

Table 3: Possible Data Types


Name Data Type number Historical Data retrieval
Market Display Data 1 No
Instruments data 2 No
Contract Dates 3 No
Strike Data 4 No
Member data 15 No
MTM data 16 Yes
Holiday 18 No
Clearing Member data 65 No
Exchange Announcements 89 Yes
News 129 Yes
Coupon Information 131 No
Trading Sessions 136 No

MITS – Exchange System Page 22 of 55


Interface Specification
Indices 138 No
Indices Data 139 No

7.4 Request Daily Trend - Message Type 61


The Request Daily Trend message allows a user to request the on screen trade history for a contract
for the current trading session.

Name Length Type Description Case Example Comment


Contract 48 Contract AN n/a Contract Contract Name for history
Name request.
Total Length 48
Bytes

7.5 Heart Beats – Message Type 84


This message contains only a header with message type 84. This message must be sent to the system
to inform the system of the users open connection. This will allow the system to verify that the user is
still connected, and has not lost connection to the system.

MITS – Exchange System Page 23 of 55


Interface Specification
8. Output Messages

8.1 Session key Challenge - Message 16


The Session Key Challenge Message is returned to a user when a successful TCP socket connection
is established to the system. This session key should be used in the encryption of the user’s login
message, and password change message.

Name Length Type Description Case Example Comment


Challenge 243 B N N/A 54341278 The session challenge
message. Received when
connecting to market.
Total 243
Length Bytes

8.2 Successful log in response – Message 1


The Successful log in message is returned to users when the user successfully authenticates to the
system. This message indicates the Open and Close times of the on screen trading session and the
time at which the Market will be offline.

Name Length Type Description Case Example Comment


Unused 12 B n/a n/a
Today date 12 Date N N/A 2014, 5, 16 Today’s date
Country Code 4 P A U TZ Indicates the
exchanges country
code.
Previous 12 Date N n/a 2014, 5, 16 Previous business day’s
Business Day date.
Unused 1 B n/a n/a
Number of 4 I N n/a 32 The number of member
Unique Members codes that is affiliated
with this member.
Is Successful 1 B N n/a 1 – True Indicates if the login
0 - False was successful or not.
Text 50 P AN n/a Invalid Indicates further detail
Password on logon failures and
success.
Pair Member 600 B n/a n/a See Structure below.
codes with unique
number

The following is the structure for the Member Unique Numbers send with the login reply message.

Name Length Type Description Case Example Comment


Member Code 6 P AN U LBTS Member code of affiliated
member.
Unique Member 4 I N n/a 2141 Unique member number of
Number affiliated member.

Total Length: 96 + Number of Unique Members x 10 Bytes (Maximum size: 696 Bytes)

MITS – Exchange System Page 24 of 55


Interface Specification
8.3 Display/Price Update Message - Message Type 59\99
The Display Update Message is returned whenever on screen activity is recorded on a particular
contract. Please refer to section 5.14 for anonymous contracts. NOTE: Only 99 messages are
compressed. A 99 message is received in reply to a 99 message. This is the reply received when
subscribing to one or many contracts.

Name Length Type Description Case Example Comment


Last 1 B N n/a 1 Indicates if this 99 message
Chunk contains the last chunk of
compressed data. If false the
next 99 message received
contains the next set of
compressed data before the
entire buffer can be
decompressed.
Display Display + B AN n/a Compressed
data (Number of
Contracts *
Depth Data)

Total Length: Compressed Length may vary

8.3.1 Display Update Message – Message Type 59\99 Display

Name Length Type Description Case Example Comment


Trading 1 B N n/a 1 Indicates if the
Anonymous contract is
anonymous or
not. True –
Anonymous
False – Non-
Anonymous.
Contract 48 Contract AN U Contract Contract for this
entry.
Mid Price 8 D N n/a 19500.00 Mid price for this
contract.
Last Dealt 8 D N n/a 19500.00 Last traded price
Price for this contract.
Last Dealt 4 B N n/a 10, 55, 59 ,0 Last time this
Time contract traded.
Deal Volume 8 I N n/a 10 Last volume
traded on this
contract.
High Price 8 D N n/a 19500.00 The high for the
day on this
contract.
Low Price 8 D N n/a 19400.00 The low for the
day on this
contract.
Day’s Volume 8 I N n/a 100 Total volume
traded on this
contract.
Last Order 4 I N n/a 10 Last quantity bid
Qty on this contract.
Last Order 1 C A U B Last action on
Buy Sell this contract.

MITS – Exchange System Page 25 of 55


Interface Specification
Last Order 8 D N n/a 19500.00 Last price bid on
Price this contract.
Number of 1 B N n/a 5 Number of depth
depth available on this
contract.
Open Interest 8 D N n/a 100 Amount of open
interest on this
contract. For
equities will
indicate the total
market cap.
Change 8 D N n/a 10 The change in
price from the
last traded price.
Auction 1 B N n/a 1 Indicates if this
contract is in
auction.
Contract 1 B N U 1 Please see table
status below for
descriptions.
Odd Lot 1 B N n/a 1 Indicates if there
is an odd lot
depth available
on this contract.
Last Traded 8 I N n/a 43 Last traded
Quantity quantity.
Date 4 I N n/a 43 Date Sequence
Sequence of contract.
Secondary 4 I N n/a 44 Secondary Date
Contract Date Sequence of
Sequence contract if
contract is
spread or split.
Strike 4 I N n/a 44 Strike Sequence
Sequence of contract if
contract is an
option.
Market Shard 4 I N n/a 44 Global sequence
Global number for re-
Sequence request
Number message.
Stack 4 I N n/a 44 Sequence
Sequence number of this
Number message for a
particular
contract.
Unused 21 B n/a n/a
Update Time 4 B N n/a 10, 59, 55, 0 Time the update
was sent.
VWAP 8 D N n/a 4000.00 Volume
Weighted
Average Price
for this contract
Closing Price 8 D N n/a 300.00 Day’s closing
price for this
contract
Reserved 1 B n/a n/a Reserved for
internal use

MITS – Exchange System Page 26 of 55


Interface Specification
Total Length 204
Bytes

Auction Description
Value
0 Contract is open
1 Contract is in auction
2 Contract is closed
3 Contract is suspended
4 Contract in open order period
5 Contract is after open period
6 Contract instrument has been halted

Contract Description
Status
Value
0 Bid or Offer activity with no change to best bid or offer
1 Bid activity which has changed the best bid on this contract
2 Offer activity which has changed the best offer on this contract
3 Bid or Offer activity which has changed both the best bid and offer on this contract
4 Trade activity has been recorded on this contract with no change to the best bid or
offer, indicates that the close price has updated
5 Trade activity which has changed the best bid on this contract
6 Trade activity which has changed the best offer on this contract
7 Trade activity which has changed the best bid and offer on this contract

8.3.2 Display Update Message – Message Type 59\99 Depth Data

Name Length Type Description Case Example Comment


Buy Side 1 B N N/A True or Indicates if this buy
Phantom false element is a phantom
**Buy Who 6 P A U AAAA Member bidding
Buy Price 8 D N n/a 19500.00 Price of bid
Buy Quantity 4 I N n/a 10 Quantity of bid
Sell Quantity 4 I N n/a 10 Quantity of ask
Sell Price 8 D N n/a 19800.00 Price of ask
**Sell Who 6 P A U BBBB Member asking
Sell Side 1 B N N/A True or Indicates if this sell element
Phantom false is a phantom
Buy Order ID 4 I N n/a 16 Active Order ID
Buy Order 4 I N n/a 0 Order Type (Table 8.3.3)
Type
Sell Order ID 4 I N n/a 16 Active Order ID
Sell Order 4 I N n/a 0 Order Type (Table 8.3.3)
Type
Total Length 54
Bytes

8.3.3 Display Update Message – Active Order Type

Type Description
0 Normal
1 Take or kill
2 Fill or kill
4 Iceberg
8 Stop order

MITS – Exchange System Page 27 of 55


Interface Specification
16 At best
32 All or nothing
64 Rebid
128 Close order
256 Reverse Take or kill
512 Market order fill or kill
1024 Run order
2048 Cover order
4096 Market order take or kill
16384 Suspend order
32768 Good till cancelled order

**Please note that if the contract is Anonymous that the length byte will be 0
followed by 4 bytes indicating the Unique member number.
Included in the message are a number of the above Depth Data messages where the number is
“Number of depth” in the first part of the message.

A note on receiving Display Update Messages (Message Type 59):

• A display update message will be received with a unique global sequence number. If a 59
message is received as a result of a trade, then a further 59 message will be received as an
update to a particular global sequence number. This update message will contain the latest
open interest and volume figures for that contract. These are published as updates to a 59
message, and therefore may contain a global sequence number which you have already
received. Any 59 messages received with a global sequence number which you have already
processed should be treated as updates and processed as such. Multiple updates can be
received for a particular global sequence number. For example if a trade is captured for 100
contracts, and this is made up of 5 legs of 20 contracts each, 5 updates will be received on the
global sequence number for that trade. These updates are due to volume and open interest
updates.
• The depth received on the display update message will display all orders on the order book.
The top of the depth will indicate the order which is currently the best order on the market. There
may however be orders at the same price going down the depth. The discretion is up to the
user whether to cumulate the quantity on the top of the depth to indicate the total quantity
available at that price.

8.4 Exchange Announcements – Message 125

Name Length Type Description Case Example Comment


Market 4 I N n/a 1 – EDM Indicates the market
Number 2- APD number on which an
4 - Global announcement was
generated.
Market Shard 4 I N n/a 1 Indicates which shard
Number the announcement was
sent from.
Error Number 4 I N n/a 12 This is the error number
of the associated error
message.
Information or 1 B N n/a 1 or 0 0 – information
error indicator message
1 – error message
Message 250 P AN n/a Fill or Kill A Description of the
order could error.
not be filled

MITS – Exchange System Page 28 of 55


Interface Specification
Total Length 263
Bytes

8.5 Business Message Reject – Message 132


A business message reject, is a reject message returned in response to an incoming message to
indicate a failure to process this message for some business validation failure.

Please see section 10 for the details of the error messages. Please note that the Information and Error
return message is a variable length message, which defines a variable length Message field with a
maximum length of 251.

Name Length Type Description Case Example Comment


Reference 4 I N n/a 1 Indicates the sequence
Sequence number of the failed
Number message to which this
reject is in response to.
Reference 3 P N n/a 42 Indicates the message
Message type of the incoming
Type message this reject is in
response to.
Text 250 P AN n/a You are not The text of the rejection
authorised for message.
this action.

Total Length: 257

8.6 Daily Trend Reply – Message 61


The Daily Trend Reply indicates to users what on screen trade activity has been recorded on a particular
contract. The response to this message is compressed. And the decompressed data will contain the
following layout. The below structure allows for up to 1000 History Suffix items. If there are more than
1000 trades captured on a particular contract, multiple Message Type 61 messages will be sent in
response to the request to cater for the full range of the day’s trades.

Name Length Type Description Case Example Comment


Contract 48 P AN U FK721 Contract code of
AAAA requested history contract.
History 1000 History n/a n/a Array of daily trend
suffix Suffix suffixes.

Total Length: 1048 Bytes

History Suffix

Name Length Type Description Case Example Comment


Price 8 D N n/a 123.15 Price of contract at time.
Quantity 8 I N n/a 45 Quantity of instrument at time.
Time 4 B N n/a 10, 55, 59 Time of price and quantity in
,0 Time Format Hours, Minutes,
Seconds, 0
Total 20
Length Bytes

8.6.1 Heart Beat – Message 10

MITS – Exchange System Page 29 of 55


Interface Specification
A heartbeat message sent to the logged in member as simply a blank header.

8.7 Indices Service


The indices service represents a subscription based feed of Indices prices. The following messages
describe how to subscribe and un-subscribe to the service, and the contents of the Indices message.
Each Index will be sent in this format.

8.7.1 Subscribing to Indices Service – Message Type 98

Name Length Type Description Case Example Comment


Subscribe 1 B N n/a 0– Indicates if the user would like to
False, subscribe or unsubscribe from the
1 - True service.

8.7.2 Indices Message – Message Type 60

Name Length Type Description Case Example Comment


Index 4 P AN n/a Indicates the sequence
sequence number of the index.
number
Opening 8 D N n/a 2850.50 Indicates the opening price of
Price the index.
Index Price 8 D N n/a 2930.00 Indicates the current price of
the index.
Update Time 4 B N n/a 10, 10, Indicates the time the index
55, 0 price was sent.
Update Date 3*4 I N n/a 2014, 4, Indicates the date the index
14 price was sent.
Market 8 D N n/a 100000 Indicates the total market cap
Capitalisation for this index

Total Length: 32 Bytes

8.8 Failure Messages


In the event that the exchange system fails the following message types should be noted, and the
appropriate actions taken from the user.

8.8.1 Notification of failure (Message 127)

The following message will be sent on the event of a failure of the exchange trading system, or in the
event of the recovery of the exchange trading system.

Name Length Type Description Case Example Comment


Failure 4 I N n/a 1 – Market Identifier to identify if a market
Notice Shard has shard has failed or recovered.
Identifier failed
2 – Market
Shard has
recovered
Market 4 I N n/a 1 – EDM Indicates the market number
Number 2- APD on which a particular market
4 - Global shard has failed.

MITS – Exchange System Page 30 of 55


Interface Specification
Market 4 I N n/a 1 Indicates the market shard
Shard which has failed. This can be
Number mapped to the Instrument
Data Download to indicate
which instruments are
affected.

Total Length: 12 Bytes

8.8.2 Failover recovery response (Message 37)

The failover recovery response message will be published automatically to all connected users to
update their transactional data (Active Orders, Deals, Completed Orders, Positions and Unmatched) in
the event of the recovery of a Market Shard, post a failure. This message can be used to update any
transactional data which may have been affected by the recovery of a market shard.

The message definition is the same as the Download Data Response (Message 36), and should be
processed the same.

PLEASE NOTE: In the case of large data transmissions the flag “Another Set to Come” could be set to
true. In this case the normal download data request message 37 should be sent by the user to retrieve
the next set of data e.g.

API Application Exchange


System
Exchange
systems send
message type 37
with Another Set
to Come set to
True.
API system sends
message type 37
with Re-Request
flag set to True to
request the next
set.
Exchange system
replies with
message type 37
with the next set
of data.

MITS – Exchange System Page 31 of 55


Interface Specification
8.9 Completed Trade – Message 58
This message will be sent out in the event where the order has been matched or trading has occurred
between two parties concerned.

8.9.1 Message details of Completed trade values


The details of the message that is sent is listed on the table; the variables of completed trade are list
on the table below.

Name Length Type Description Case Example Comment


Order 48 AN n/a Order Contract is a
Contract structure, which has
values inside it.
Sequence 4 I
number
Price 8 D N n/a 2500.01 Price of on the traded
order
Quantity 8 D A n/a 1000 The quantity on the
traded order
Open Price 8 D A n/a 5000 Trade price when the
market opens.
Previous 8 D A n/a 4000.00 Previous day closing
Closing price.
Price
Closing 8 D N n/a 6000.00 Last traded price at
Price the end of day when
the market closes.
Change 8 D N n/a 5.5 Change In Percentage
From Previous day
Closing Price
Open 8 D N n/a 5.5 Market capitalization
Interest per security.
Low 8 D N n/a 1500.00 Low price for a
security
High 8 D N n/a 5500.00 High price for security
Day Volume 8 D N n/a 25000 Total trades that have
occurred.
VWAP 8 D N n/a VWAP = Total price divided by
1500.00/100.00 total volume
Trade Type 4 I N n/a Normal = 0, Odd Specifies the type of
=1 trade that took place
Trade Date 12 Date N n/a 2018/05/09 The date when trade
occurs

Total Length: 156 Bytes

8.9.2 Message details of Order contract values


The order contract values that are sent out within the completed trade are listed on the table.

Name Length Type Description Case Example Comment


Identifier Prefix 4 B AN n/a F – Future Identifies the type of
E - Equity the contract.
Expiry Date 12 Date N n/a 2018/05/06 Expiry date of the
contract
Instrument Name 5 B A n/a Short Name The short name of the
= VWDK instrument.
Strike 8 D N n/a 1000 Value of the option
strike

MITS – Exchange System Page 32 of 55


Interface Specification
CallPut 1 B A n/a C Call (C) or Put (P)
indicator for an option
contract
Secondary Expiry 12 Date N n/a 2018/05/06 Defines the expiry
Date date for the second
leg of a spread.
Secondary 5 B A n/a Short Name The Short Name of
Instrument Name = VWDK the second instrument
traded for split
contracts
Is Delta Option 1 B N n/a 1 or 0 Indicates if this option
trade is a Delta
Option strategy
Total Length 48
Bytes

9. Download Data Structures

The following structures are received when downloading data. An example of this process can be found
in Input Messages.

All these Messages are compressed when they are received in reply to a 36 message 123
messages received on the real time channel will not be compressed.

9.1 Request Data Header – Message Type 36 and 123


Please see Large Data Transmission for the handling of this message.

The Request Data Header will be attached to all 36 and 123 message received by the user. This
indicates the Data Type received. For 123 messages the Specific Record and Action fields are filled to
indicate the specific record received and the action to be taken.

Name Length Type Description Case Example Comment


Data Type 1 I N n/a 5 See Table 3: Possible Data
Types for identifiers.
Unused 1 B
Last Piece 1 B N n/a 1 – True Indicates if the data contained
of Chunk 0 – False in download data is the last
record, or if more to come.
Another set 1 B N n/a 1- True Indicates if there is another set
to come 0 - False of data to come. If this is true, a
re-request should be issued to
retrieve the next set.
Action 4 I N n/a 1 For 123 messages indicates if
Delete – 1, Insert – 2, Update –
3, otherwise 0 for file download.
Specific 4 I N n/a 54522 Allows to download a specific
Record record sequence number
Download 12 I N n/a 2014, 5, Date of days records which
Date 16 must be downloaded
Download 5000 B AN n/a Compressed data returned.
Data
Total 5024
Length Bytes

MITS – Exchange System Page 33 of 55


Interface Specification
9.2 Instruments Data – Number 2
The Instruments Data record defines instruments traded on a market.

The Instrument Group Sequence indicates to which group this instrument belongs to in a Series Spread
Margin grouping. The Group Margin field indicates the Series Spread Margin requirement for this
instrument in the Series Spread Grouping. The other instruments in this group can be determined by
going to the specified record in the Group Definition data to which this instrument points to in the
Instrument Group Sequence field.

The Fee details applicable to this instrument for Futures, Options and Deliveries are defined by going
to the appropriate record in the Fee Data record pointed to by the Future Fee Sequence, Option Fee
Sequence and Delivery Fee Sequence fields of this structure.

Name Length Type Description Case Example Comment


Instrument 4 I N n/a 3433 Sequence number of
Sequence instrument record
Trading 4 I N n/a 1 Sequence number of the
Session trading session linked to
Sequence this instrument.
Unused 4 B n/a n/a
Instrument 4 I N n/a 23 Group Sequence Number
Group to which this instrument
Sequence belongs to. See Error! R
eference source not
found..
Future Fee 4 I N n/a 65 Fee Sequence Number
Sequence which defines the fee
structure for future deals
on this instrument. See
Error! Reference source n
ot found. Fee Data.
Option Fee 4 I N n/a 16 Fee Sequence Number
Sequence which defines the fee
structure for option deals
on this instrument. See
Error! Reference source n
ot found. Fee Data.
Delivery Fee 4 I N n/a 23 Fee Sequence Number
Sequence which defines the fee
structure for deliveries on
this instrument. See
Error! Reference source n
ot found. Fee Data.
Market 1 C N n/a 1 Market Number on which
Number this instrument trades.
Market Shard 1 C N n/a 1 Indicates the market
Number subset on which this
instrument is listed.
Instrument 5 P AN U AAAA Name of the instrument
Name
Instrument 1 C A n/a 2 Instrument type number
Type Number which defines the class of
instrument. Please see
table below for
instrument type
definitions

MITS – Exchange System Page 34 of 55


Interface Specification
ISIN Code 13 P AN U ABD433-12 ISIN number of the
instrument. If Applicable
Description 62 P AN n/a All share A Description of the
index instrument
On Screen 1 B N n/a 1 Indicates if this
instrument is tradable or
not.
Maturity Date 12 D N n/a 2014,5,16 Date of the maturity date
for a bond
Unused 4 I
Nominal 4 I N n/a 100 For bond instruments,
Divisor indicates what divisor
should be applied when
representing a quantity
as nominal.
Issue Date 12 Date N n/a 2014, 5, 16 Date at which instrument
was issued.
Linked to 1 C A U N – None, C Indicates if this bond is
Floating Rate – CPI Index linked to a floating rate.
Unused 1 B n/a n/a
Underlying 4 I N n/a 43422 Instrument sequence of
underlying instrument
Options 1 B N n/a 1 Indicates of this
Exercise Is instrument uses a
Percentage percentage based option
exercise points system or
not.
Options 8 D N n/a 1500.00 Indicates either the
Exercise Cost percentage or amount
which an option will be
considered in the money
Group Margin 8 D N n/a 8.5 Indicates the group
margin applicable for this
instrument when part of a
group.
VAT 1 B N N/a Indicates if VAT is
applicable on this
instrument or not.
Settlement 8 D N n/a 2560 The settlement margin
Margin used for agricultural
derivative instruments.
Physical 1 B N n/a 1 – True Indicates if this
Settlement 0 – False instrument is physically
settled, or not.
Group 60 P AN n/a AAAA / INDI Indicates the group make
Description up for this instrument.
Unused 4 B
Reference 8 D N n/a 12.256 Used to specify a
Inflation Rate reference inflation rate.
Minimum 8 D N n/a 12500.00 Fee applied for the first
initiation fee trade on this instrument.
First Trade 10 P AN n/a A0100000A Indicates the reference
Reference number of the first trade
on this instrument.
Unused 5 B
Country Code 4 P A n/a TZ Indicates the country
code for this instrument.
Display Name 30 P AN n/a KES/$ This field allows the
exchange to indicate how
MITS – Exchange System Page 35 of 55
Interface Specification
an instrument should be
presented. This is to
supplement the
Instrument Name
Number of 4 I N n/a 364 Indicates the number of
days in a year days in a year to be used
in pricing,
Bond Formula 4 I N n/a 4 Indicates the number of
decimal places decimal places the bond
pricing calculation should
use for rounding.
Coupon Rate 8 D N n/a 12.5 Coupon rate paid for this
bond.
Classification 30 P AN n/a Corporate This field defines the
Bonds instrument classification
to which the bonds
belongs to.
Settlement 4 I N n/a 3 Indicates the settlement
Days days applied for the
settlement cycle on this
instrument
Validated At 1 B N n/a 1 – True, 0 - Indicates if a balance for
CSD False trading is validated at the
CSD for this instrument.
Proprietary 1 B N n/a 1 – True, 0 - Indicates if the instrument
Trading False allows orders to be
Allowed placed directly on the
brokers code.
Vetting agent 30 P A The name of any vetting
name agent for this instrument
Vetting agent 30 P A Contact information for
contact the vetting agent
Share holding 8 D N The allowed share
percentage holding percentage any
limit one account can hold.
Sector 30 P AN n/a Tourism Describes a market
sector for a security
Security Type 30 P AN n/a Ordinary Categorizes securities
into their various types
Total Length 486
Bytes

9.3 Instrument Types – Number 39


The instrument types download provides a list of available instrument types or asset classes on this
exchange.

Name Length Type Description Case Example Comment


Instrument 4 I N n/a 3252 Sequence number for this
Type Sequence record
Unused 4 B
Instrument 4 I N n/a 1 A unique number for this
Type Number instrument type
Identifier Prefix 1 C A U F Indicates the identifier
prefix to use on contract
definitions

MITS – Exchange System Page 36 of 55


Interface Specification
Instrument 10 P A U EQUITY Indicates the instrument
Type Code type code
Instrument 25 P A n/a Cash A description of the
Type Name Equities instrument type
Total Length 48
Bytes

9.4 Contract Dates – Number 3


The Contract Dates Record defines the Expiry Dates for a particular Instrument Record.

The Spread Margin Requirement for this expiry is defined in the Spread Margin field. The Initial Margin
Requirement is also defined in the Initial Margin field.

Name Length Type Description Case Example Comment


Instrument 4 I N n/a 3252 Instrument sequence
Sequence number to which this
expiry belongs to.
Contract Date 4 I N n/a Contract Date Sequence
Sequence Number.
Trading Session 4 I N n/a 1 Trading Session
Sequence Sequence Number
Expiry Date 12 Date N n/a 2014, 5, Date of the expiry date of
16 the date record
Valuation Date 12 Date N n/a 2014, 5, Date of the valuation date
16 of this contract date
record.
Nominal 8 D N n/a 100 Nominal in which this
instrument is issued
Strike Interval 8 D N n/a 10 Interval in which new
strikes can be loaded
Strike Interval 8 D N n/a 50 Interval in which new
Off Screen strikes can be loaded
when trading report only.
Spread Margin 8 D N n/a 2 Indicates the spread
margin applicable for this
expiry in a group.
Lot size 4 I N n/a 1 Indicates if a full lot size
is applicable to this
contract, otherwise 1.
Option Lot size 4 I N n/a 1 Indicates if a full lot size
is applicable to option
contracts, otherwise 1
Big Depth 1 B N n/a 36 Indicates the maximum
depth available to view
on this contract
Price Rate 1 C A U P ‘P’ for Price or ‘R’ for
Rate
Max Change 8 D N n/a 10 Percentage of the
maximum change from
the last traded price
allowed
Max Days Move 8 D N n/a 10 Value of the maximum
change from the opening
price allowed
Max Gap 8 D N n/a 12.0 Maximum gap between
the current value and

MITS – Exchange System Page 37 of 55


Interface Specification
upper and lower bound
as a percentage
Unused 1 B n/a n/a
Options Allowed 1 B N n/a 1 Indicates if options are
traded on this contract or
not.
Deltas Allowed 1 B N n/a 1 Indicates if delta options
are traded on this
contract or not.
Spreads Allowed 1 B N n/a 1 Indicates if spreads are
traded on this contract or
not.
Initial Margin 8 D N n/a 1500 Indicates the initial
margin requirement for
this contract.
Quote Format 4 I N n/a 4 Indicates the format of
Decimal Places the prices quoted on
screen for live trading.
Price Format 4 I N n/a 4 Indicates the format of
Decimal Places the price at which deals
are recorded at.
Option Premium 4 I N n/a 4 Indicates the format of
Format Decimal the premiums at which
Places option deals are recorded
at.
Price Multiplier 2 N N n/a 100 Indicates the unit size for
bonds when calculating
the consideration.
Clearance Date 12 Date N n/a 2014, 5, Date of the clearance
16 date for this contract
VSR 8 D N n/a Volatility Scanning Range
for this contract.
RPVE 8 D N n/a Range Price Volatility
Effect for this contract
Volatility 4 I N n/a 4 Indicates the number of
Rounding decimal places volatilities
Places are rounded to for
options.
Can trade 1 B N n/a 1 – True, 0 Indicates if options can
options - False be traded onscreen on
onscreen this contract.
Can trade 1 B N n/a 1 – True, 0 Indicates if options can
options report - False be traded report only on
only this contract.
Can trade 1 B N n/a 1 – True, 0 Indicates if this contract
onscreen - False can be traded onscreen.
Can trade report 1 B N n/a 1 – True, 0 Indicates if this contract
only - False can be traded report only.
Price Interval 8 D N n/a 0.001 Indicates in what intervals
prices can be quoted.
Minimum Valid 4 I N n/a 100 Indicates the minimum
Bid Volume On order quantity which can
Screen be submitted on screen
Minimum Valid 4 I N n/a 100 Indicates the minimum
Bid Volume Off unmatched trade quantity
Screen which can be submitted
off screen

MITS – Exchange System Page 38 of 55


Interface Specification
Minimum Valid 4 I N n/a 100 Indicates the minimum
Bid Volume On order quantity which can
Screen Options be submitted on screen
for options
Minimum Valid 4 I N n/a 100 Indicates the minimum
Bid Volume Off unmatched trade quantity
Screen Options which can be submitted
off screen for options
All Or Nothing 1 B N n/a 1 Indicates if all or nothing
allowed order type can be used
on this contract
At Best Orders 1 B N n/a 1 Indicates if at best order
Allowed type can be used on this
contract
Stop Orders 1 B N n/a 1 Indicates if stop orders
Allowed can be used on this
contract
Ice Berg Orders 1 B N n/a 1 Indicates if ice berg
Allowed orders can be used on
this contract
Hold Over 1 B N n/a 1 Indicates if hold over
Orders Allowed orders can be used on
this contract
At Close Orders 1 B N n/a 1 Indicates if at close
Allowed orders can be used on
this contract
Future 1 B N n/a 1 = true, Indicates if the futures on
Anonymous 0 = false this contract are
anonymously traded.
Option 1 B N n/a 1 = true, Indicates if the options on
Anonymous 0 = false this contract are
anonymously traded.
Unused 17 B
RFQ Allowed 1 B N n/a 1 = true, Indicates if RFQs can be
0 = false processed on this
contract.
Quantity Tick 4 I N n/a 10000 Indicates the interval in
Size which quantities are
allowed to be submitted
Unused 8 B n/a n/a
Minimum All Or 8 I N n/a 651 Indicates the minimum
Nothing Quantity quantity allowed for all or
nothing orders.
Minimum 8 I N n/a 745 Indicates the minimum
Iceberg Quantity quantity for iceberg
orders
Good Till 1 B N n/a 1 = true, Indicates whether Good
Cancelled 0 = false Till Cancelled (GTC) order
Allowed
instructions are allowed.
Total Length 243
Bytes

9.5 Strike Data – Number 4


The Strike Data record defines a strike record for an option on a particular Contract Date. Delta option
strikes are indicated by Deltas being set to true (1).

MITS – Exchange System Page 39 of 55


Interface Specification
Name Length Type Description Case Example Comment
Strike Sequence 4 I N n/a 12342 The strike sequence
Number number of this record
Contract Date 4 I N n/a 12522 The dates sequence
Sequence number
Strike 8 D N n/a 19232.00 The strike price of this
contract
Strike Expiry 12 Date N n/a 2014, 5 The exercise date of this
Date ,16 strike.
Deltas 1 B N n/a 1 – True Indicates if this is a delta
0 – False option strike
Call Or Put 1 C A n/a C Indicates if this is a Call
or Put option strike
Total Length 30
Bytes

9.6 MTM Data – Number 16


The MTM Data record defines the end of day closing statistics for a particular contract.

Name Length Type Description Case Example Comment


Instrument 4 I N n/a 1225 Instrument sequence
Sequence number.
Date 4 I N n/a 1455 Dates sequence
Sequence number.
Strike 4 I N n/a 6442 Strike sequence
Sequence number.
Contract 48 Contra AN U Contract Contract name of this
ct record.
Day’s Closing 8 D N n/a 19500.00 Closing Mark-to-
Price market price.
Day’s Closing 8 D N n/a 8.5 Closing Mark-to-
Rate market rate (this would
apply to rate traded
products such as Spot
Bonds, Bond Futures)
Open Interest 8 D N n/a 12 Open interest on this
contract.
Date 12 Date N n/a 2014, 5, Date of the price.
16
Spot Price 8 D N n/a 19500 Spot price for this
contract.
Volatility 8 D N n/a 45 Future or Option
Volatility for this
contract.
High Price 8 D N n/a 19500.00 The high for the day
on this contract.
Low Price 8 D N n/a 19400.00 The low for the day on
this contract.
Days Volume 8 D N n/a 100 Total volume traded on
this contract.
Shares In 8 D N n/a 150.00 Indicate the shares in
Issue issue
Open Price 8 D N n/a 19500.00 Day’s opening price of
this contract

MITS – Exchange System Page 40 of 55


Interface Specification
Previous 8 D N n/a 19500.00 The previous business
Close Price days closing price for
the security

Total Length 160


Bytes

9.7 Holiday Data – Number 18


The Holiday Data record defines the holidays applicable for a specific centre. The holiday data can be
used to determine previous business day.

Name Length Type Description Case Example Comment


Holiday 4 I N n/a 1225 Holiday sequence number.
Sequence
Country Code 4 P AN n/a KEN Indicates the country for
which this holiday applies.
Holiday Date 12 Date N n/a 2014, 5, DOS Date of the holiday.
16
Reminder 1 B N n/a 1 – True, Indicates if this item is only a
Only 0 - False reminder
Is Early Close 1 B N n/a 1 – True, Indicates if this day is when
0 - False the market will close early
Is Futures 1 B N n/a 1 – True, Indicates if this day is a
Close Out 0 - False futures close out day
Total Length 23
Bytes

9.8 Market Display Data – Number 1


The Market Display Data record defines all available contracts in the day’s trading session. Only
contracts specified in this download are available to be traded.

Name Length Type Description Case Example Comment


Display 4 I N n/a 2333 Display sequence
Sequence number of this record.
Contract 48 Contract AN U Contract Contract name of this
record.
Open Price 8 D N n/a 19500.00 Day’s opening price of
this contract
Instrument 4 I N n/a 1235 Instrument sequence
Sequence number
Date 4 I N n/a 1522 Dates sequence number
Sequence
Strike 4 I N n/a 333 Strike sequence number
Sequence
Second 4 I N n/a 5122 Secondary instrument
Instrument sequence number for
Sequence split / switch instruments
Second Date 4 I N n/a 5631 Secondary dates
Sequence sequence number for
spread instruments
Total Length 80
Bytes

MITS – Exchange System Page 41 of 55


Interface Specification
9.9 Member Data – Number 15
The Member Data indicates all available members on the market.

Name Length Type Description Case Example Comment


Member 4 I N n/a 2355 Member sequence of this
Sequence record.
Master Member 4 I N n/a 2123 Member sequence of the
Sequence master member.
Clearing 4 I N n/a 1612 Clearing member
Member sequence of this
Sequence members clearing
member.
Member Code 5 P A U AAAA Member code for this
member.
Description 50 P AN n/a AAAA Name or Description of
Brokers this member.
Unused 4 B
SOR Account 17 P AN n/a 10012454 SOR Account Number for
the Member
Unused 8 B
Total Length 96
Bytes

9.10 Clearing Member Data – Number 65


The Clearing Member Data displays all Clearing Members available on the market.

Name Length Type Description Case Example Comment


Clearing member 4 I N n/a 23 This is the Clearing
Sequence member sequence.
Clearing member 6 P NA U LJBCC This is the code used
code for the clearing
member.
Clearing member 50 P NA U LJB This is the Description
Description Clearing of the clearing
house member.
Total Length 60
Bytes

9.11 Exchange Announcements – Number 89


The Exchange Announcement data provides a list of announcements which were sent by the exchange
for a particular trading day.

Name Length Type Description Case Example Comment


IdMarket 4 I N n/a 1 Identifier of the
market.
Announcement 4 I N n/a 2422 Sequence number of
Sequence the exchange
announcement record.
Announcement 12 Date N n/a 2007,6,18 Date of the exchange
Date announcement.
Announcement 4 B N n/a 10, 54, 55, 0 Time of the exchange
Time announcement.

MITS – Exchange System Page 42 of 55


Interface Specification
Announcement 255 P AN n/a “Market times Announcement as
have been sent by the exchange.
extended”

Total Length: 279 Bytes

9.12 News Service – Number 129


This data defines the layout of News messages that may be received from the exchange. This
message is sent as multiple segments of a single news message. All segments for a particular News
Number should be combined to make up the full message.

Name Length Type Description Case Example Comment


Date 12 Date N n/a 2013, 8, 1 Date the news was sent.
Time 4 B N n/a 10, 15, 20, Time the news was sent
0
Message 2 I N n/a 1– Indicates the filter for this
Category Type General news message
2–
Instrument
3 - Sector
Message 50 P AN n/a ALSI Indicates the value which is
Category associated with the category
Value type
News Number 2 I N n/a 1 Indicates the number
associated to this News
message.
Total number 2 I N n/a 5 Indicates the number of
of segments segments that make up the
full news message.
Segment 2 I N n/a 1 Indicates the number of this
Number segment.
Message 255 P AN n/a This is a Indicates the text for this
news segment of the news
message message.

Total Length: 329 Bytes

9.13 Coupon Information – Number 131


This data defines the coupon information for bond instruments. This table will return all coupon payment
dates for the instrument from the current day, until maturity of the instrument.

Name Length Type Description Case Example Comment


Coupon 4 I N n/a 1 Indicates the sequence
Sequence number for this record.
Instrument 4 I N n/a 1 Indicates the instrument this
Sequence coupon record is applicable to.
Coupon 12 Date N n/a 2014, 5, Indicates the date of the
Date 16 coupon payment date.
Books 12 Date N n/a 2014, 5, Indicates the date of the
Close Date 16 books close date.
Coupon 8 D N n/a 10.25 Indicates the coupon rate for
Rate this coupon payment.
Redemption 8 D N n/a 43.5 Indicates the percentage of
Value the bond which is redeemed
on this date.

MITS – Exchange System Page 43 of 55


Interface Specification
Total Length: 48 Bytes

9.14 Trading Sessions – Number 136


This information represents the session times for contracts. The contract date record has a link to this
table to indicate when this contract opens and closes for trading.

Name Length Type Description Case Example Comment


Trading 4 I N n/a 1 Indicates the sequence
Session number for this record.
Sequence
Trading 56 P A n/a Indicates the name of the
Session trading session
Name
Opening 4 B N n/a 9, 0, 0 Indicates when the opening
Auction auction on this contract starts.
Start Time
Opening 4 B N n/a 9, 30, 0 Indicates when the opening
Auction auction on this contract
Close Time closes.
Closing 4 B N n/a 17, 0, 0 Indicates when the closing
Auction auction on this contract starts.
Start Time
Closing 4 B N n/a 17, 30, 0 Indicates when the closing
Auction auction on this contract
Close Time closes.
Contract 4 B N n/a 9, 30, 0 Indicates when the contract
Open Time opens for continuous trading.
Contract 4 B N n/a 17, 30, 0 Indicates when continuous
Close Time trading on this contract closes.
Intraday 4 B N n/a 17, 0, 0 Indicates when the intraday
Auction one auction on this contract
One Start starts.
Time
Intraday 4 B N n/a 17, 30, 0 Indicates when the intraday
Auction one auction on this contract
One closes.
Auction
Close Time
Intraday 4 B N n/a 17, 0, 0 Indicates when the intraday
Auction two auction on this contract
Two Start starts.
Time
Intraday 4 B N n/a 17, 30, 0 Indicates when the intraday
Auction two auction on this contract
Two closes.
Auction
Close Time
Intraday 4 B N n/a 17, 0, 0 Indicates when the intraday
Auction three auction on this contract
Three Start starts.
Time
Intraday 4 B N n/a 17, 30, 0 Indicates when the intraday
Auction three auction on this contract
Three closes.

MITS – Exchange System Page 44 of 55


Interface Specification
Auction
Close Time
Overnight 4 B N n/a 9, 30, 0 Indicates when the contract
Admin opens for an overnight admin
Open Time period. This period only allows
post trade messages.
Overnight 4 B N n/a 17, 30, 0 Indicates when overnight
Admin admin period on this contract
Close Time closes.
Admin 4 B N n/a 17, 30, 0 Indicates when the admin
Period period on this contract closes.
Close Time After this no trading is allowed
on this contract.
Unused 8 B
Pre-open 4 B N n/a 9, 30, 0 Indicates when the pre-open
order entry order entry period starts. This
Open Time period only allows orders to
be prepared on the order book
for submission at contract
open.
Pre-open 4 B N n/a 17, 30, 0 Indicates when pre-open order
order entry entry period on this contract
Close Time closes.
Unused 8 B

Total Length: 144 Bytes

9.15 Indices Data – Number 138


This information informs what indices are available.

Name Length Type Description Case Example Comment


Indices 4 I N n/a 1 Indicates the sequence
Sequence number for this record.
Indices Code 20 P AN n/a ALSI Indicates the short code for
this index.
Indices 50 P AN n/a All Share Provides a description for the
Description Index index.
Classification 30 P AN n/a Bond Classifies indices into various
Market classes or categories

Total Length: 104 Bytes

9.16 Indices Price Data – Number 137


This information informs what the value of the index is. This download will return all price ticks of the
index for the supplied date.

Name Length Type Description Case Example Comment


Indices 4 I N n/a 1 Indicates the index sequence
Sequence number for this record.
Opening 8 D N n/a 1852.52 Indicates the opening price of
Price the index
Index Price 8 D N n/a 1895.20 Indicates the price of the
index at that time.
Update Time 4 C N n/a Indicates the time this index
was updated.
MITS – Exchange System Page 45 of 55
Interface Specification
Update Date 12 Date N n/a 2014, 5, Indicates the date for this
16 index.
Market 8 D N n/a Indicates the market
Capitalisation capitalisation for this index

Total Length: 44 Bytes

9.17 Shares in Issue Data – Number 141


This data returns the number of shares in issue per equity instrument.

Name Length Type Description Case Example Comment


Shares In 4 I N n/a 1 Indicates the sequence
Issue number for this record.
Sequence
Instrument 4 I N n/a Indicates the instrument
Sequence sequence for the instrument
Balance 8 D N n/a Indicates the current number
of shares in issue
Current 8 D N n/a Indicates the current value of
Value the shares in issue based on
yesterday’s closing price
Previous 8 D N n/a Indicates the previous days
Balance shares in issue
Previous 8 D N n/a Indicates the previous value of
Value the shares in issue

Total Length: 40 Bytes

9.18 Index Data – Number 146


This is to allow for holistic reporting on our indices. This data also represents the official EOD Index
figures that is published to the market daily.

Name Length Type Description Case Example Comment


Index Data 4 I N n/a 1 Indicates the sequence
sequence number for this record.
Indices 4 I N n/a 3 Indicates the indices
sequence sequence for this record
Trade Date 12 Date N n/a 2016, 03, Indicates the trade date of
04 the current record
Index Value 8 D N n/a 4000.21 Indicates the value of the
index at the indicated date
Market 8 D N n/a 5555.99 Indicates the market
Capitalization capitalization of the index at
the indicated date

Total Length: 36 Bytes

9.19 Index Constituents Data – Number 147


This is to allow for a download of the instruments that compose an Index.

Name Length Type Description Case Example Comment

MITS – Exchange System Page 46 of 55


Interface Specification
Index 4 I N n/a 1 Indicates the sequence
Instrument number for this record.
sequence
Indices 4 I N n/a 3 Indicates the indices
sequence sequence for this record
Instrument 4 I N n/a 10 Indicates the instrument
sequence sequence for the instrument

Total Length: 12 Bytes

10. Error and Information Messages

10.1 Information Message

Number Message Why When Sent To Who


100 Password When After sending a message type 0 The user on the
changed changing the socket
successfully password, connection.
indicates that
the password
was changed
successfully.
102 Market The exchange At the exchange’s discretion All connected
Announcement can broadcast socket
an connections.
announcement
108 Generic Notifications to Appropriate
Market members users.
Interaction about deals
message assigned to
them and other
deal
messages.
116 Successful Client When adding a new client The user on the
Client Loaded successfully (message type 102) socket
loaded. connection.
120 Your password Message to When validating your login The user on the
expires in x indicate when message (0) socket
days. your password connection.
expires.
123 Mark to Market The mark to After the end of day procedures To all connected
Rates is ready market rates have been completed users.
for download. have been
added for
today and are
ready for
download.
124 Daily Rates is The daily rates After the daily rates have been To all connected
ready for have been inserted by the exchange. users
download. added for
today and
ready for
download.
126 The Re- The current After sending message type 3 The user on the
Request volume of re- socket
service is requests being connection

MITS – Exchange System Page 47 of 55


Interface Specification
currently un- dealt with by
available. the exchange
Please try has exceeded
again later. the allowed
limit, and the
users request
can only be
dealt with
when that
volume has
been reduced
to below the
limit.
127 Early Indicates that After the early valuation Users on the
Valuations are the early procedure is completed by the EDM market.
ready for valuation data exchange.
download. is ready to
download.

10.2 Error Messages

Number Message Why When Sent To Who


2 Order quantity The contract has been After sending a bid The dealer who
below minimum setup with a lotsize, (message type 56) sent the bid
and the bid quantity is message.
below this
3 Bid on contract The bid was entered After sending a bid The dealer who
was not a for a contract which (message type 56) sent the bid
multiple of the was setup with a message.
lotsize lotsize, and the
quantity was not a
multiple of this.
7 Trading on this Order was placed on After sending a bid The dealer who
contract is only a contract which has (message type 56) sent the bid
allowed between not opened for message.
x and x trading.
8 Your bid initial The bid is for an order This message is sent The dealer who
margin exceeds which exceeds the when a bid message is sent the bid
your limit dealer’s margin limit received. If the dealer's message.
for this contract. This margin limit for this
is determined by contract has been
multiplying the initial exceeded, this error
margin of the contract message is returned
by the quantity of the immediately.
bid, and checking that
against the dealer's
limit.
12 Invalid data in This message is sent This message is sent The dealer who
bid message: when a user tries to when a bid message is sent the bid
number of orders send a bid message received. If the number message.
exceeds limit with the number of of orders is invalid, this
orders field which is error message is
greater than 10, or returned immediately.
less than 0.
13 Invalid data in This message is sent This message is sent The dealer who
bid message: when a user tries to when a bid message is sent the bid
Incorrect send a bid message received. If the contract message.
contract name or in which any one of name in any of the
MITS – Exchange System Page 48 of 55
Interface Specification
Number Message Why When Sent To Who
contract doesn't the orders contains an orders is invalid, this
exist invalid contract name. error is returned
immediately.

18 Could not find Contract name The dealer who


index for contract specified is not in a sent the
x valid format. message.

19 Could not create Contract name After entering a bid on The dealer who
strike specified for the a new strike (message sent the bid
option contract was type 56) message.
not valid.

20 Not a buy sell The buy sell indicator The dealer who
order specified was not sent the bid
valid, must be either B message.
or S

21 Invalid Order Order type parameter After sending a bid The dealer who
type in the bid message message (type 56) sent the bid
was incorrect. message.

22 Bid outside The bid placed was After sending a bid The dealer who
market limits outside the market message (type 56) sent the bid
limits for this contract message.

24 Member does Member code The dealer who


not exist specified does not sent the bid
exist. message.

25 Order type not Order type parameter After sending a bid The dealer who
allowed in the bid message is message (type 56) sent the bid
not allowed on this message.
particular contract

26 Invalid client Client code specified The dealer who


code does not exist sent the
message.
27 Not a valid Member code The dealer who
member code specified is not valid, sent the
must be 4 characters message.
long

28 Not a valid Clearing Member The dealer who


clearing member code specified is not sent the
code valid, must be 5 message.
characters and end
with a C

29, 30 Invalid front end The version specified After sending a login The dealer who
version in the login message message sent the
is not supported by message.
the exchange

31 Dealer does not Dealer code specified The dealer who


belong to is not a dealer for this sent the
member member message.

MITS – Exchange System Page 49 of 55


Interface Specification
Number Message Why When Sent To Who
32 Cannot book The member code The dealer who
deals for other specified is not the sent the
members same member as the message.
logged in connection.

33 Invalid Principal Principal code The dealer who


supplied is not valid sent the
message.
34 Member does Member code The dealer who
not belong to specified is not a sent the
clearing member member of the message.
clearing member
35 Cannot book The clearing member The dealer who
deals for other code specified is not sent the
clearing the same clearing message.
members member as the logged
in connection.

36 X is not a client Client code specified The dealer who


of member does not belong to sent the
logged in member message.

37 Invalid Counterparty The dealer who


counterparty specified is invalid, or sent the
does not exist message.

39 Dealer not found Dealer specified is not The dealer who


a dealer of the sent the
member message.

40 Invalid cancel Cancel flag specified The dealer who


flag is not valid, must be 0 sent the
-5 message.

41 Invalid reference Reference number The dealer who


number specified was invalid, sent the
must be 9 characters message.

42 Instrument not Instrument specified The dealer who


found does not exist sent the
message.
43 Contract Date Contract date The dealer who
not found specified does not sent the
exist message.

44 Strike not found Strike specified does The dealer who


not exist sent the
message.
46 Dealer not a The action specified The dealer who
master dealer can only be done by sent the
master dealers message.

47 FOK/TOK order This message When a bid message is The dealer who
cannot be indicates that a Fill or received with the FOK, sent the bid
satisfied Kill, or Take or Kill or TOK flag set. The message.
order could not be bid is validated, and if
satisfied, since the unsuccessful, the error
quantity available on will be returned.

MITS – Exchange System Page 50 of 55


Interface Specification
Number Message Why When Sent To Who
the opposite side of
the stack is not
sufficient to satisfy the
FOK or TOK
execution constraint.

48 All or nothing not An all or nothing order After sending a bid The dealer who
allowed was entered for a message (message sent the bid
contract which does type 56) message.
not allow all or nothing
order
49 Trading on this Each contract has an When a bid message The dealer who
contract is open time and a close or suspend/cancel sent the bid or
closed time associated with message is received suspend/cancel
it. If the time at which and the current time is message.
a bid or suspend outside contract
message is received open/close, then this
is before the open message will be
time, or after the close returned immediately.
time, this message
will be sent.
50 Order quantity The contract has been After sending a bid The dealer who
below minimum setup with a lotsize, (message type 56) sent the bid
and the bid quantity is message.
below this
51 Bid on contract The bid was entered After sending a bid The dealer who
was not a for a contract which (message type 56) sent the bid
multiple of the was setup with a message.
lotsize lotsize, and the
quantity was not a
multiple of this.
52 Invalid spread Price of the spread or After sending a bid The dealer who
split order would message on a spread sent the bid
create orders on the or split contract message.
underlying which is
invalid
53 Odd Lots not This message is sent This message is sent The dealer who
allowed when when a bid message when a bid message is sent the bid
underlying in is received for an odd received for an odd lot message.
auction lot order, and that order and the contract
contract is in auction. is in auction. This error
message is then
returned immediately.
54 Not allowed to This dealer is not The dealer who
change authorised to change sent the
subscription subscription policy message.
60 Limits specified When setting limits for The dealer who
must be positive a dealer, the values sent the
specified can only be message.
positive
62 Principal Agency Principal Agency The dealer who
indicator is indicator entered was sent the
invalid invalid. Must be either message.
P or A
63 Cannot suspend Cannot suspend an The dealer who
an order 1 order after 1 minute sent the
minute before before the end of the message.
Open Order Period

MITS – Exchange System Page 51 of 55


Interface Specification
Number Message Why When Sent To Who
the end of Open
Order Period
64 Spreads not This message is sent This message is sent The dealer who
allowed with when a user tries to when a bid message is sent the bid
underlying in put up a bid on a received, and the message.
auction spread, or split underlying contract of a
contract, and either spread or split contract
one of the contracts is in auction. This
which make up the message is then sent
spread or split immediately.
contract are in
auction.
66 Contract is The contract specified After sending a bid The dealer who
suspended is currently message. sent the
suspended from message.
trading
67 Dealer code is The dealer code The dealer who
empty specified was not sent the
filled in message.
68 Incorrect price The price format The dealer who
format specified is incorrect sent the
message.
69 Strike cannot be The creation of the The dealer who
loaded strike was unable to sent the
be completed message.
70 Price cannot be Price specified on this The dealer who
less than zero contract cannot be sent the
less than 0 message.
71 Quantity cannot Quantity specified on The dealer who
be less or equal this contract cannot sent the
to zero be less than or equal message.
to 0
72 Must be a Action specified to be The dealer who
master dealer to performed can only be sent the
perform this completed by master message.
action dealers
73 Contract not a This message is sent This message is sent if The dealer who
valid contract when the contract the contract name is sent the
name in a message is invalid in any of the message.
not one which the following message
system recognizes. type: Display Update
Request, Option
Display Update
Request, Bid Message,
Suspend Message.
74 The active order The active order After sending a reduce The dealer who
selected cannot selected cannot be message (message sent the
be found found in database type 104) message.
76 Cannot reduce Orders submitted After sending a reduce The dealer who
an order 1 during Open Order message (message sent the
minute before period cannot be type 104) message
end of Open reduced, 1 minute
Order Period before the end of the
Open Order Period
77 Cannot resubmit Orders suspended After sending a The dealer who
an order 1 during Open Order resubmit message sent the
minute before Period cannot be (message type 27) message
resubmitted 1 minute

MITS – Exchange System Page 52 of 55


Interface Specification
Number Message Why When Sent To Who
end of Open before the end of
Order Period Open Order Period
78 Cannot suspend Orders suspended After sending a The dealer who
this order until during Open Order suspend message sent the
market opens. Period cannot be (message type 8) message
suspended until
market open, if market
open order period has
closed
80 This order type Order type specified After submitting multi The dealer who
has not been has not been enabled. bid message (message sent the
enabled on this type 56) message
contract.
81 Order quantity x Order quantity After submitting multi The dealer who
is less than 1 on submitted is less than bid message (message sent the
contract x 1 type 56) message
82 Price cannot be Order price submitted After submitting multi The dealer who
less than or is less than 0 or equal bid message (message sent the
equal to 0. to 0 type 56) message
83 This order You cannot use After submitting cancel The dealer who
cannot be message type 15 to order (message type sent the
deleted as it is delete an active order. 15) message
currently active.
Please use
message 8.
84 The From You cannot specify an After submitting re- The dealer who
Sequence from sequence request message sent the
cannot be larger greater than the to (message type 13) message
than the To sequence.
Sequence.
87 Order sequence The order sequence After cancelling a The dealer who
x cannot be number supplied suspended order sent the
found. could not be found in (message type 15) message
the database.
101 Invalid Password Password supplied is After logging in The user on the
or Incorrect Date incorrect, or date used (message type 0) socket
as not correct connection
103 Invalid Old Password change After sending a The user on the
Password contained the message type 0 socket
incorrect old connection
password
104 Submitted on Submitted onscreen After sending limit The user on the
screen limit limits exceed existing change message socket
invalid limit (message type 6) connection
105 Submitted option Submitted option After sending limit The user on the
limit invalid limits exceed existing change message socket
limit (message type 6) connection
106 Submitted report Submitted report only After sending limit The user on the
only limit invalid limits exceed existing change message socket
limit (message type 6) connection
109 Member does Giving notice for When doing a physical The user on the
not have position delivery on a contract delivery (message type socket
on this contract on which you do not 128) connection
have a position
110 Can only give Giving notice for When doing a physical The user on the
notice for delivery on a long delivery (message type socket
delivery on a position. 128) connection
short position

MITS – Exchange System Page 53 of 55


Interface Specification
Number Message Why When Sent To Who
111 Cannot give Cannot give notice on When doing a physical The user on the
notice on certificate, because delivery (message type socket
certificate, the certificate is not 128) connection
because the the same instrument
certificate is not as the delivery notice
the same
instrument as the
delivery notice
112 Number of Giving notice of When doing a physical The user on the
contracts in delivery for more than delivery (message type socket
notice exceeds your position allows 128) connection
total position
113 Silo Certificate Silo Certificate When adding a new The user on the
Number is not Number is not within silo certificate socket
within the valid the valid range for this (message type 129) connection
range for this silo silo
114 Invalid When loading a client, When adding a new The user on the
multiplication the multiplication client (message type socket
factor factor must be either 102) connection
100, 125, 150, or 170
115 Contact Details Contact details When adding a new The user on the
error supplied are invalid client (message type socket
102) connection
117 Market Period The current market The user on the
Rule error period does not allow socket
for the sent message connection
type
118 You have no Indicates you do not All connected
rights to perform have sufficient rights sockets
this operation setup to send this
message
119 Auction Indicates the begin All connected
Notifications: and end of an auction sockets
"Contract xxx is period
entering an
auction period."
"Auction on
contract xxx has
been extended
for 2 minutes."
"Auction on
contract xxx has
been extended
for 5 minutes."
"Auction on
contract xxx has
closed."

121 Cannot delete a The certificate which After sending a delete The user on the
certificate which you are trying to silo certificate message socket
is ready for delete has already (136) connection
delivery or been delivered or is
delivered. ready for delivery.
1000 Generic
Exception

MITS – Exchange System Page 54 of 55


Interface Specification
11. Glossary

Term Definition
A Alpha only

ACK Acknowledgement
AN Alphanumeric
B The field is made up of 1 or more bytes of type U
C Single character ASCII equivalent
D Intel/IEEE floating point 8 byte format
FF Hex for 255
FOK Fill or Kill
I Intel Integer format; the length is defined
LZH Compressed file format
MTM Market to Market
N Numeric only - Default for types I.U.D
NACK Negative Acknowledgement
NOB Number of bids
P Pascal type string with leading length byte, maximum length is
the defined length – 1. All strings in Exchange System are
represented in this manner
TCP / IP Transmission Control Protocol / Internet Protocol
TOK Take or Kill
U Intel unsigned integer; the length is defined
URL Uniform Resource Locator
XOR Mathematical term for exclusive disjunction
Information Subscriber Those entities which will be subscribing to the public data for
their own use, and onward redistribution to their external clients.

MITS – Exchange System Page 55 of 55


Interface Specification

You might also like