LMEsource Client Interface Specification v404
LMEsource Client Interface Specification v404
Document History
Version Date Changes
4.00 11 Jun 2020 Initial release of document for electronic market data
from the new LMEselect v10
Page 2
Page 2
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Contents
1 INTRODUCTION ............................................................................................................................ 6
1.1 Purpose ................................................................................................................................... 6
1.2 Delivery Phasing ..................................................................................................................... 6
1.3 Reading Guide ........................................................................................................................ 7
1.4 Products .................................................................................................................................. 7
1.4.1 Product Summary Table .................................................................................................. 7
2 SYSTEM OVERVIEW .................................................................................................................. 10
2.1 Scope .................................................................................................................................... 10
2.1.1 Multicast ......................................................................................................................... 10
2.1.2 Dual Multicast Channels ................................................................................................ 10
2.1.3 Recovery Mechanisms................................................................................................... 10
Page 3
Page 3
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 4
Page 4
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 5
Page 5
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
1 Introduction
1.1 Purpose
The LME has embarked on a program to fully rebuild its trading platform, LMEselect, and to upgrade
the technology of its market data platform, LMEsource. LMEsource will be the LME’s sole market data
platform, disseminating incremental updates for bid, ask, trade, statistics and provide recovery and
supporting services for client processing of this market data.
This document specifies the updated binary interface for the new LMEsource v4, which will disseminate
electronic market data from the new LMEselect v10.
A later update to this document will include details of the non-electronic market data messages.
Function Reference
TAPOs TAPOs
Page 6
Page 6
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Note: details of the non-electronic message formats are not included in this document. These details
will be included in a future version.
1.4 Products
A range of products are provided catering for the varying needs of LMEsource clients. Each product
may contain multiple distinct multicast channels, and will contain data for both futures and options. The
set of products will encompass Level 1 Top-of-Book, Level 2 15 Levels Price Book and Level 3 Full
book offerings.
The table below shows the market data products and the specific chapters in this document that are
relevant to each individual product.
Page 7
Page 7
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
3.4 Control
Messages
3.5 Retransmission
3.6 Refresh
4.1.1 Outright
Definition (301)
4.1.2 Strategy
Definition (302)
4.3.2 Level 2
Aggregate Order
Book Update
(353)
Page 8
Page 8
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
6 Recovery
7 Level 2
Aggregate Order
Book
Management
8 Level 3 Full
Order Book
Management
Page 9
Page 9
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
2 System Overview
2.1 Scope
Dual Refresh
Request Retrans
multicast Dual multicast
TCP/IP TCP/IP
channels channels
Client
LMEsource provides market data represented in an efficient binary message format for all instruments
traded on the LME Market. It has been designed for high throughput and low latency.
2.1.1 Multicast
Messages are published in a one-to-many fashion using the IP multicast and UDP transport protocols.
Multicast is not a connection-oriented protocol. Data is sent strictly in one direction from server to
clients.
Due to the inherently unreliable nature of the UDP transport, packets may be lost or delivered out of
sequence. To mitigate the risk of packet loss, the messages are duplicated and sent over two separate
multicast channels (dual channels). Technically, a multicast channel corresponds to a multicast group.
Each pair of dual multicast channels has a unique identifier, which is referred to as the ChannelID.
More details regarding the configuration parameters (including the IP addresses and port numbers
corresponding to the multicast channels) will be found in the LME Systems Connectivity Guide which
will be provided at a later stage.
Page 10
Page 10
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
LMEsource will normally be brought up at around 00:15 – 00:30am. This start up time is not rigid and
the LME has the right to adjust this time according to different trading situations.
On each channel the first message at the start of the business day is the Sequence Reset message.
The Sequence Reset message carries sequence number 1. On receipt of this message, the client must
clear all cached data for all instruments.
At start-up, LMEsource will disseminate reference data comprised of Outright Definition and Strategy
Definition messages for all outright and strategy tradable instruments.
If a client starts listening after the start of the business day and misses the Sequence Reset message
and reference data, it must use the refresh service to recover and synchronize with the real time
channels.
Normal message transmission is expected between when the market opens for trading and when the
market is closed. Heartbeats are sent at regular intervals (currently set at every 2 seconds) on each
channel when there is no activity. The LME may adjust this interval.
LMEsource will typically shut down at around 21:00 London time after the clearing procedure has
completed. A later shutdown may occur due to special circumstances. The shutdown time is not rigid
and the LME has the right to adjust this time according to different trading situations.
Page 11
Page 11
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
A Disaster Recovery (DR) Signal message indicating the DR status will also be sent on its dedicated
channel when LMEsource is brought up – see section 3.4.3 for more information about the DR Signal
message.
IP addresses and ports that have been provided for the DR site’s retransmission service should be
used. See the LME Systems Connectivity Guide for more details.
Page 12
Page 12
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
3.1
The following table lists all the data types used by LMEsource.
Format Description
String ASCII characters which are left aligned and padded with spaces, unless
otherwise specified.
Page 13
Page 13
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
From time to time certain fields cannot be populated and specific values are used to represent null.
The table below shows the values used to represent null for different data types.
Uint8 0x00
Int8 0x80
Int32 0x80000000
Int64 0x8000000000000000
In order to avoid decimal calculation in LMEsource, all price and percentage fields are provided as
integers with implied decimal places. Implied decimal places for each field are stated as below table.
Clients require to perform the actual scaling for data value.
Page 14
Page 14
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
3.2
Multicast packets are structured into a common packet header followed by zero or more messages.
Messages within a packet are laid out sequentially, one after another without any spaces between
them.
The maximum length of a packet is 1500 bytes which includes the multicast headers, packet header
and messages.
A packet will only ever contain complete messages. A single message will never be fragmented across
packets.
All packets will begin with a common packet header. The packet header provides information including
the total packet length, the number of messages within the packet, the sequence number of the first
message and a send timestamp.
3 Filler String 1
Page 15
Page 15
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Header length 16
3.3
The format of each message within a packet will vary according to the message type. However,
regardless of the message type, each message will start with a two-byte message size (MsgSize)
followed by a two-byte message type (MsgType). These are described in the following table.
Page 16
Page 16
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 17
Page 17
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
3.4
3.4.1 Heartbeat
Heartbeats consist of a packet header with MsgCount set to 0. They do not carry a sequence number
and therefore do not increment the sequence number of the multicast channel. SeqNum is set to the
sequence number of the previous message sent on the channel.
The Heartbeat message will be identical for all the services.
The Sequence Reset message is sent on each multicast channel at start of day. It may also be sent
intraday in case of a disaster recovery.
The client must ignore the sequence number of the Sequence Reset message itself, and set the next
expected sequence number to NewSeqNo. The client may receive multiple sequence reset messages
from all channels. Whenever the Sequence Reset message is received, clients must clear all cached
data for all instruments traded in the Market and then subscribe to the refresh channels to receive the
current state of the market.
Total length 8
Page 18
Page 18
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The Disaster Recovery (DR) Signal message is sent on a dedicated multicast channel (DR channel)
whenever a site failover is triggered. In normal situations, the dedicated DR channel only carries
heartbeats until the end of the business day.
When site failover begins, a DR Signal is sent with “DRStatus=1” indicating that the DR process has
been activated. Clients should then clear all cached market data and prepare their own system for the
site failover. When the site failover process finishes, a DR Signal will be sent with “DRStatus=2”,
thereupon clients can start to rebuild the latest market image from the refresh service. The same DR
Signal will be sent periodically until the end of the business day.
Total length 8
3.5 Retransmission
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
3.5
Page 19
Page 19
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Refer to section 6.3 Retransmission service for details on the retransmission messages.
Note that when the Logon (101) or Retransmission Request (201) messages are sent to the LMEsource
server, the client must also include a packet header as shown below.
Also note that the same header is used by the RTS server when sending either a Logon Response
(102) or a Retransmission Response (202) messages to clients. In this case the SeqNum and
SendTime fields are not relevant and can be discarded.
There is no Logoff required for the Retransmission service. The client can simply disconnect from the
session.
Total length 16
After this header, the fields for either Logon (101) or Retransmission Request (201) should follow.
The Logon message enables client authentication. This is not required for multicast channels and is
only used for retransmission requests.
Page 20
Page 20
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Normal operation: The client sends a Logon message containing username to LMEsource, which
responds with a Logon Response message with the SessionStatus set to 0 (Session Active).
Total length 16
5 Filler String 3
Total length 8
Page 21
Page 21
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
6 Filler String 2
Total length 16
Page 22
Page 22
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
7 Filler String 1
Total length 16
3.6 Refresh
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
3.6
Refer to section 6.4 Refresh service for details on the Refresh Complete message.
Page 23
Page 23
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
This message is published to mark the end of a refresh cycle, see section 6.4 for a full description of
refresh.
Total length 8
Page 24
Page 24
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
4.1
Static reference data is organised into two messages that provide a full list of all securities/tradable
instruments available on the LMEselect electronic market. The two messages are shown in the entity
relationship diagram below. The bold field(s) form the primary key for each message type.
This section is only applicable to reference data for instruments traded on the LMEselect electronic
market.
Page 25
Page 25
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The SecurityID field is used to link order and trade messages to the instrument definition. Instrument
State (312) messages that are only applicable to one instrument also use SecurityID to link back to the
instrument definition.
Page 26
Page 26
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 27
Page 27
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
0 means no
linked tradable
instrument
Page 28
Page 28
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 29
Page 29
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
109 LotSize Uint64 8 The lot size for e.g. ‘20’, ‘25’,
this tradable ‘5000’
instrument
F = Future
O = Other
Page 30
Page 30
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Default = Space
(i.e. not applicable)
Page 31
Page 31
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 32
Page 32
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 33
Page 33
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
a delta-hedge
custom strategy.
Null Value
otherwise.
Total length 71 +
22no
There are occasions when there are two tradable instruments for a contract which share the shame
Prompt Date. This occurs when the 3M Rolling Prompt instrument coincides with a calendar dated
tradable instrument. This results in two Outright Definition messages being published by LMEsource,
one for each tradable instrument. In each of these Outright Definition messages, the field
MergedSecurityID will contain the SecurityID for the corresponding tradable instrument.
All market data updates, quotes, trades and statistics, will be published using the SecurityID for the
Rolling Prompt tradable instrument.
4.2
This message indicates the trading state of instruments at the contract level, e.g. Copper Futures,
Aluminium Options. The ContractCode field is common across the Contract State (311), Outright
Definition (301) and Strategy Definition (302) messages and is used to link the contract state to
individual tradable instruments.
Page 34
Page 34
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 35
Page 35
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Blank = Active
(or when
pause/halt has
been lifted)
45 Filler String 3
Total length 48
Page 36
Page 36
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
January 1, 1970
UTC.
Precision is
provided to the
nearest
microsecond.
41 Filler String 3
Page 37
Page 37
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Total length 44
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4.3.1
The Top of Book message is generated when the top price level has been modified. There are no
‘New’, ‘Change’ or ‘Delete’ actions for the Top of Book. Whenever the price, quantity or the number of
orders at the Top of Book changes, a new message is sent.
Whenever an order book is emptied as a result of market activity, a Top Of Book message with price
fields set to Null and aggregate quantity / number of orders set to zero will be sent.
Page 38
Page 38
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 39
Page 39
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 40
Page 40
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4.3.2
The aggregate order book is sent whenever there is an order book change within the top 15 price
levels. The ordering of the price levels in the Aggregate Order Book (353) message in the RFS
snapshot will be from best to worst.
Refer to Section 7 - Aggregate Order Book Management for details on the Aggregate Order Book
Update message.
Page 41
Page 41
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 42
Page 42
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
in this price
level and side
Total length 23 +
43no
Page 43
Page 43
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4.3.3
The Order Add message is generated when an order is placed in order book. An incoming, aggressing
order that matches against one or more resting orders will not be published as an Order Add message,
unless it has residual volume after matching.
Page 44
Page 44
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
71 Filler String 1
Total length 72
Page 45
Page 45
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4.3.4
The Order Amend message is generated when an order is amended in the orderbook.
Page 46
Page 46
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
71 Filler String 1
Total length 72
Page 47
Page 47
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4.3.5
The Order Cancel message is generated when an order is cancelled in the orderbook.
Page 48
Page 48
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
reached the
LMEselect gateway
55 Filler String 1
Total length 56
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4.3.6
The Order Executed message is generated when an order is executed. It will only be produced for
explicit orders, not implied orders.
Page 49
Page 49
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 50
Page 50
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
matched against
each other
Total length 53 +
29no
Page 51
Page 51
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4.3.7
The Orderbook Clear message is generated when order book is required to be clear, for example after
the transition between certain market states, or when an instrument’s Trading State Condition is ‘Trade
Halt’.
The market state transitions that result in an Orderbook Clear message are:
1. Pre-Open to Open. Any order events entered during Pre-Open that didn’t match during
uncrossing are published after the Orderbook Clear message.
2. Open to Post-Trade.
Following an 'Orderbook Clear' message, if an instrument is subsequently open for trading any resting
orders will be sent as Aggregate Order Book Update / Order Add messages to allow clients to rebuild
the orderbook.
An Orderbook Clear message will not be published when an instrument enters or leaves ‘Trade Pause’.
Page 52
Page 52
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
instrument
changed, resulting
in the Orderbook
Clear message.
Specified as
nanoseconds from
midnight, January
1, 1970 UTC.
Precision is
provided to the
nearest
microsecond.
Total length 22
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4.3.8
The Quote Request message is generated when a request for quote is accepted by the ME.
Page 53
Page 53
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
28 Filler String 2
Total length 30
Page 54
Page 54
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4.3.9
The IOP is the predicted opening trade price which is calculated using the uncrossing algorithm during
Pre-Open. If there are no crossed prices, no IOP is calculated or disseminated. If a tradable instrument
does not have a crossed order book but does have both a bid and offer price then a mid-price (IOMP)
will be calculated and published instead of the IOP.
An IOP and IOMP are mutually exclusive, i.e. when an IOP is available the IOMP is not applicable, and
will be set to null, and vice versa.
At the market state transitions from Pre-Open to Open, an IOP message with IndicativeOpeningPrice,
IndicativeOpeningVolume and IndicativeOpeningMidPrice set to null is published for every tradable
instrument to indicate the IOP and IOMP prices are no longer valid.
Page 55
Page 55
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
derived the
IOP/IOMP.
Specified as
nanoseconds
from midnight,
January 1, 1970
UTC.
Precision is
provided to the
nearest
microsecond.
42 Filler String 2
Total length 44
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
Page 56
Page 56
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
4.4.1
The Match Trade message is generated each time a trade has been performed. When an incoming
order matches against multiple resting orders, there will be one Match Trade message published for
each matched trade.
At market open, a Match Trade message will be published for any orders entered during Pre-Open that
matched
Page 57
Page 57
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Total length 44
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4.4.2
The EOD Trade Statistics message is generated when the market moves to the Post-Trade session
for instruments that have traded. LMEsource will publish the LMEselect Opening and Closing Prices,
LMEselect Trading High, and LMEselect Trading Low for all contracts that have traded during the day.
Page 58
Page 58
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Note: due to sequence of message publication the EOD Trade Statistic message may be disseminated
before the Instrument State (312) message that confirms the instrument as being in the ‘Post-Trade’
or ‘Closed’ state.
Page 59
Page 59
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Total length 54
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4.4.3
The Intraday Trade Statistics message contains trade information for completed trades. The trade
statistics information is provided on a snapshot basis.
At market open, if there has been any uncrossing activity in the instrument, three messages will be
published, one each for open price, high price and low price. Each of these three messages will include
any previously published OHL price.
If there was no uncrossing activity in the instrument, a single Intraday Trade Statistics message is
published, with the OpenPrice, HighPrice and LowPrice fields set to null.
The OpenPrice is only populated as a result of matched trades during uncrossing, if there was no
uncrossing activity in the instrument the OpenPrice will remain as null throughout the trading day.
Upon the first trade of the day, two messages will be published, one each for high price and low price.
Page 60
Page 60
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Total length 46
Page 61
Page 61
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Page 62
Page 62
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
6 Recovery
The information supplied in this section and its sub-sections applies to the data feed(s) marked with
[]
4
Event Action
Packet lost on one either Line A or Try to recover data from the other line
Line B with a configurable timeout (“arbitration
mechanism”).
Late start up or extended intraday Wait for a refresh of the current market
outage state and then continue with real time
messages.
Page 63
Page 63
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The sequence numbers provided in every packet header is calculated by adding the previous sequence
number and the message count, as shown in the table below:
Packet 1 1 4
Packet 2 5 2
Packet 3 7 1
Packet 4 8 3
Packet 5 11 1
If the client drops the first five packets they would request a gap fill for messages 1-11.
All messages conform to the message level sequencing. Each channel has its own sequence number.
This allows recipients to detect gaps or duplicates in each message sequence number and, if
appropriate, reconcile them (line arbitration) with the primary or secondary multicast groups or request
retransmission of the missing / corrupted messages.
Users should use this sequence number to detect gaps in the transmission of messages.
The following diagram illustrates how the message sequence number should be used to detect gaps
in the feed.
Page 64
Page 64
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Begin
Ignore Packet No
(Duplicate)
Is current SN + MsgCount
Yes in current packet less than the
next expected SN ?
No
Yes
Process messages
Yes
End
Page 65
Page 65
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
SNs
Messages that are sent
Sequence in which messages are sent
However it is not guaranteed that the packet content between Line A and Line B will be the same. For
example the third packet of the day from the Line A could contain SN 10 with MC 3, whereas the third
packet of the day from Line B could contain SN 9 with MC 4. For this reason clients must arbitrate on
SN (at the message level) rather than packet content. Client applications should listen to both Line A
and Line B in real-time. Clients should look at packets coming from both lines and process the ones
that arrive first, regardless of whether they came from Line A or Line B. It is advisable to apply the “first
come – first served” rule.
Additional Notes;
- The above example of a dropped packet is a simplified example assuming 1 message per packet, in
reality each packet is likely to contain multiple messages
Page 66
Page 66
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
- Whilst the order of individual messages between Line A and Line B will be identical, there is no
guarantee that the packets will contain exactly the same messages.
- In the example below, three packets are sent on each line, but message ‘OrderUpdate3’ appears in
one packet from Line A but in the subsequent packet on Line B.
Primary Secondary
Messages MC SN SN MC Messages
Page 67
Page 67
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Logon
Logon RESPONSE
Retransmission REQUEST
Retrans. Server
Client
Retransmission Results
Requested Messages
Logon
The client establishes a TCP/IP connection and initiates a session by sending the Logon message.
Once the client is authenticated the server will respond immediately with the Logon Response
message. If the client does not send a Logon message within the logon timeout interval, the server will
close the connection.
Logons may be rejected for the following reasons:
Invalid username
User already connected
In all cases the server will close the connection after sending the Logon Response message.
Making a request
The client can make a retransmission request by sending the Retrans Request message. The server
will respond with a Retrans Response message to indicate whether the request has been accepted or
not.
In the case of a successful request the server will send the requested messages immediately after the
Retrans Response message.
The sequence numbers will be the same as when they were first sent on the real time multicast channel.
The framing of the retransmitted messages into a packet may differ from the original transmission.
Retransmission requests may be rejected for the following reasons:
Page 68
Page 68
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
In the case where the client has exceeded the maximum number of requests allowed in a day, the
server will close the connection after sending the Retrans Response message.
The following diagram is a guideline of the flow of logic when making a request:
No Contact Helpdesk
Logon to the Retransmission
Is the logon accepted? and use the Refresh
Server
Service
Yes
No
Clients can send multiple requests during a session and can keep the session open during idle periods
by responding to heartbeats sent by the server. Concurrent sessions however will not be supported.
Each user can only have one session open at a time.
If a client makes multiple requests, the server will process them serially. Clients are unable to cancel
outstanding requests.
Heartbeats
To determine the health of the user connection on the TCP/IP channel, the Retransmission Server will
send regular heartbeat packets to the user. The heartbeat frequency is 30 seconds. The client
application must respond with a “Heartbeat Response” packet. The time out for this heartbeat response
Page 69
Page 69
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
packet is set at 5 seconds. If no response is received by the server within this timeframe, the TCP/IP
session will be disconnected.
Heartbeat
Retrans.
Server
User
TCP/IP
Heartbeat Response
A “heartbeat response” packet consists in an exact copy of the incoming heartbeat packet.
System limits
Please note that the maximum number of requests per day limit is across all channels.
High availability
For each site, two sets of IP addresses and ports are provided for the retransmission service in order
to facilitate high availability. Clients may connect to both retransmission services at the start of the day
and maintain the connection during the day by responding to heartbeats.
Page 70
Page 70
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The LME will provide a Fully Qualified Domain Name (FQDN) to access the retransmission service.
Under normal operation the FQDN will resolve to the high availability retransmission service at the
Active Production site. Clients may connect to the retransmission service at the start of the day and
maintain the connection during the day by responding to heartbeats.
Disaster recovery
During normal conditions the retransmission service at the disaster site is not available. If clients
attempt to connect, this will fail.
In the unlikely event of a disaster recovery situation, the retransmission service at the disaster site will
be brought up and clients may connect via the backup IP addresses and ports.
Snapshot
A snapshot of the market state is described in the table below.
Instruments Definition A full list of all Outright Definition, which includes any
modifications or additions made intraday. The order is sent as:
Instrument Status The most recent Instrument State (312) message of declared
SecurityID.
Contract Status The most recent Contract State (311) messages of declared
ContractCode.
Page 71
Page 71
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Orders For L1 clients: the latest level 1 Price book via Top of Book (355)
messages.
For L2 clients: the latest 15 levels of Price book via Aggregate
Order Book (353) messages. The ordering of the price levels in
the Aggregate Order Book (353) message in the RFS snapshot
will be from worst to best. This is the reverse of the sequence in
the real-time Aggregate Order Book (353) message.
For L3 clients: the snapshot of the full orderbook via Order Add
(357) messages. The OrderbookPosition field and the T1, T2
and T3 timestamp fields won’t be populated in the RFS
snapshot.
Intraday Trade Statistics The latest Intraday Trade Statistics (352) message of declared
SecurityID.
EOD Trade Statistics The latest EOD Trade Statistics (351) message of declared
SecurityID.
Match Trade A replay of all Match Trade (360) messages from start of day.
Quote Request The latest Quote Request (356) message of declared Security
ID.
The ordering of refresh messages types within the multicast channels is detailed below:
Instrument Definition Outright Definition (301), Strategy Definition (302), EOD Trade
Statistics (351)
Order (L1 clients) Instrument State (312), Contract State (311), IOP (354), Quote
Request (356), Top of Book (355)
Page 72
Page 72
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Order (L2 clients) Instrument State (312), Contract State (311), IOP (354), Quote
Request (356), Aggregate Orderbook Update (353)
Order (L3 clients) Instrument State (312), Contract State (311), IOP (354), Quote
Request (356), Order Add (357)
Refresh complete
A Refresh Complete message is sent at the end of a snapshot indicating the sequence number with
which the snapshot is synchronized.
Snapshot processing
Below is an overview of the steps to carry out in order to process a channel snapshot.
Subscribe to the real time multicast channel and cache received messages.
Subscribe to the corresponding refresh multicast channel and discard messages until the
Refresh Complete message is received.
Process received messages until the next Refresh Complete message is received.
Store the LastSeqNum sequence number provided in the Refresh Complete.
Unsubscribe to the refresh multicast channel.
Discard the cached real time messages with sequence number less than or equal to
LastSeqNum.
Process the remaining cached real-time messages and resume normal processing.
Missed messages
The retransmission server does not support refresh channels. If a client misses messages, it must wait
for the next snapshot. Similarly if a client starts listening during the middle of a snapshot, it must wait
for the next snapshot.
Page 73
Page 73
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
5
Book Identification
Price No. Of No. of Agg. Price Price Agg. No. of No. of Price
Level Implied Explicit Quantity Quantity Explicit Implied Level
Orders Orders Orders Orders
Page 74
Page 74
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
5 - - - - - - - - 5
Book Updates
Book update messages are generated by LMEsource as delta messages defined in section 4.3.2
Aggregate Order Book Update (353). Each message may contain any combination of new, changed,
or deleted entries for a book. The nature of an entry is defined by its UpdateAction.
0 MsgSize 109
2 MsgType 353
4 MDSource EL
6 TimeOfEvent 123456789
14 SecurityID 1234
Page 75
Page 75
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
22 NoEntries 2
23 AggregateQuantity 200
31 Price 9770
39 NumberOfExplicitOrders 2
43 TotalQtyOfExplicitOrders 200
51 NumberOfImpliedOrders 0
55 TotalQtyOfImpliedOrders 0
63 Side 2 (Ask)
64 PriceLevel 2
65 UpdateAction 1
66 AggregateQuantity 300
74 Price 9850
82 NumberOfExplicitOrders 1
86 TotalQtyOfExplicitOrders 300
94 NumberOfImpliedOrders 0
98 TotalQtyOfImpliedOrders 0
107 PriceLevel 5
108 UpdateAction 0
Page 76
Page 76
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Price No. Of No. of Agg. Price Price Agg. No. of No. of Price
Level Implied Explicit Quantity Quantity Explicit Implied Level
Orders Orders Orders Orders
5 - - - - 9850 300 1 0 5
0 MsgSize 66
2 MsgType 353
4 MDSource EL
6 TimeOfEvent 123456789
14 SecurityID 1234
22 NoEntries 1
Page 77
Page 77
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
23 AggregateQuantity 50
31 Price 9740
39 NumberOfExplicitOrders 1
43 TotalQtyOfExplicitOrders 50
51 NumberOfImpliedOrders 0
55 TotalQtyOfImpliedOrders 0
63 Side 1 (Bid)
64 PriceLevel 1
65 UpdateAction 0
After processing this message, the client’s book should look as follows:
Price No. Of No. of Agg. Price Price Agg. No. of No. of Price
Level Implied Explicit Quantity Quantity Explicit Implied Level
Orders Orders Orders Orders
The price levels for the existing Bid orders must all be incremented even though there will not be
Aggregate Order Book Update messages sent for these increments. The implied bid order with a price
of 9730 at (new) price level 2 remains in the orderbook, even though it is no longer at the best price.
Page 78
Page 78
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
0 MsgSize 109
2 MsgType 353
4 MDSource EL
6 TimeOfEvent 123456789
14 SecurityID 1234
22 NoEntries 2
23 AggregateQuantity 250
31 Price 9750
39 NumberOfExplicitOrders 1
43 TotalQtyOfExplicitOrders 250
51 NumberOfImpliedOrders 0
55 TotalQtyOfImpliedOrders 0
63 Side 1 (Bid)
64 PriceLevel 1
65 UpdateAction 0
66 AggregateQuantity 110
Page 79
Page 79
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
74 Price 9710
82 NumberOfExplicitOrders 1
86 TotalQtyOfExplicitOrders 110
94 NumberOfImpliedOrders 0
98 TotalQtyOfImpliedOrders 0
107 PriceLevel 5
108 UpdateAction 1
After processing this message, the client’s book should look as follows:
Price No. Of No. of Agg. Price Price Agg. No. of No. of Price
Level Implied Explicit Quantity Quantity Explicit Implied Level
Orders Orders Orders Orders
Price 9750 and quantity 250 is added according to the message. Price 9700 and quantity 250 must
be deleted by the client.
Page 80
Page 80
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Price 9710 quantity must be reduced to 110. The AOB update messages uses the price level 5 to
reflect the new price level of the price 9710 after the addition of the new price level a with a price of
9750.
0 MsgSize 109
2 MsgType 353
4 MDSource EL
6 TimeOfEvent 123456789
14 SecurityID 1234
22 NoEntries 2
23 AggregateQuantity 250
31 Price 9750
39 NumberOfExplicitOrders 1
43 TotalQtyOfExplicitOrders 250
51 NumberOfImpliedOrders 0
55 TotalQtyOfImpliedOrders 0
63 Side 1 (Bid)
64 PriceLevel 1
Page 81
Page 81
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
65 UpdateAction 2
66 AggregateQuantity 250
74 Price 9700
82 NumberOfExplicitOrders 1
86 TotalQtyOfExplicitOrders 250
94 NumberOfImpliedOrders 0
98 TotalQtyOfImpliedOrders 0
107 PriceLevel 5
108 UpdateAction 0
Price No. Of No. of Agg. Price Price Agg. No. of No. of Price
Level Implied Explicit Quantity Quantity Explicit Implied Level
Orders Orders Orders Orders
Page 82
Page 82
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
0 MsgSize 66
2 MsgType 353
4 MDSource EL
6 TimeOfEvent 123456789
14 SecurityID 1234
22 NoEntries 21
23 AggregateQuantity 300
31 Price 9780
39 NumberOfExplicitOrders 2
43 TotalQtyOfExplicitOrders 300
51 NumberOfImpliedOrders 0
55 TotalQtyOfImpliedOrders 0
63 Side 2 (Ask)
64 PriceLevel 3
65 UpdateAction 1
Page 83
Page 83
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Price No. Of No. of Agg. Price Price Agg. No. of No. of Price
Level Implied Explicit Quantity Quantity Explicit Implied Level
Orders Orders Orders Orders
0 MsgSize 109
2 MsgType 353
4 MDSource EL
6 TimeOfEvent 123456789
14 SecurityID 1234
22 NoEntries 2
23 AggregateQuantity 150
Page 84
Page 84
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
31 Price 9770
39 NumberOfExplicitOrders 2
43 TotalQtyOfExplicitOrders 0
51 NumberOfImpliedOrders 0
55 TotalQtyOfImpliedOrders 0
63 Side 2 (Ask)
64 PriceLevel 2
65 UpdateAction 1
Price No. Of No. of Agg. Price Price Agg. No. of No. of Price
Level Implied Explicit Quantity Quantity Explicit Implied Level
Orders Orders Orders Orders
Page 85
Page 85
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
6
Book Identification
Book Updates
The information needed to build an order book view from the message flow is contained within the
following messages:
Orders are ranked by orderbook position based upon price and time priority, with 1 denoting the highest
ranked order. When an order is cancelled or fully filled, all existing orders below it should shift their
position up one step to fill the “void”.
The Order Add (357) message signals that a new order is placed in the order book. If there are already
orders in that position, recipients should check the price of existing orders (with the same orderbook
position). If the price of the existing order(s) is worse than the price of new order, all existing orders
below the new order should shift down one position. If the price of the existing order(s) is better than
the price of new order, it signifies an error (something has gone wrong with the order book).
The Order Amend (358) message signals that the order has been modified. The current rank may or
may not be lost in the process. The OrderBookPosition field will show the new rank within the book.
The order must be removed from its previous position and inserted at the new OrderBookPosition if
the new position is not the same as previous one. Removal of an order causes existing orders below
it to shift their position up one level. An order inserted at an existing position should be handled as per
an Order Add (357).
Page 86
Page 86
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The Order Cancel (359) message tells the recipient to remove the order referenced. If the order
cancelled or fully filled is the last order at that position, the deleted order causes all existing orders
below it to shift their position up one step to fill the “void”.
The Order Execute (350) messages tells the recipient to deduct the traded order from the order book.
If the order is fully filled, the associated order (OrderID) should be removed from the order lists. If it
was the only remaining order at that order position, all existing orders below it should shift their position
up one step to fill the “void”. If the order is partially executed, the executed quantity should be deducted
from the associated order in the order lists.
In certain failure scenarios LMEsource may send an 'Orderbook Clear' message at which point clients
should clear all orders in the book for the specified instrument.
Following an 'Orderbook Clear' message any existing orders for the instrument will be resent as Order
Add (357) messages to rebuild the current image.
The table below shows the starting position of the orderbook for the following examples:
0 MsgSize 72
2 MsgType 357
Page 87
Page 87
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
4 MDSource EL
6 TimeOfEvent 123456789
14 T1 123456789
22 T2 123456789
30 T3 123456789
38 SecurityID 1234
46 OrderID 0006
54 Side 1 (Bid)
55 Quantity 75
59 Price 9720
67 OrderBookPosition 4
71 Filler -
The new Bid order 0006 is inserted into the orderbook at position 4. The existing order 0002 at the
same price of 9720 remains in its higher position of 3 due to its time priority. Orders 0001 and 0005
must have their orderbook positions adjusted down one step by the client.
Page 88
Page 88
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
0 MsgSize 72
2 MsgType 358
4 MDSource EL
6 TimeOfEvent 123456789
14 T1 123456789
22 T2 123456789
30 T3 123456789
38 SecurityID 1234
46 OrderID 0002
54 Side 1 (Bid)
55 Quantity 300
59 Price 9720
67 OrderBookPosition 3
71 Filler -
Page 89
Page 89
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
The quantity of Bid order 0002 is reduced from 350 to 300. It remains at orderbook position 3.
0 MsgSize 72
2 MsgType 359
4 MDSource EL
6 TimeOfEvent 123456789
14 T1 123456789
22 T2 123456789
30 T3 123456789
Page 90
Page 90
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
38 SecurityID 1234
46 OrderID 1001
54 Side 2 (Ask)
55 Filler -
The client must remove OrderID 1001 from their orderbook, and adjust the orderbook position for the
remaining Ask Orders up by one step.
Page 91
Page 91
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
0 MsgSize 53
2 MsgType 350
4 MDSource EL
6 TimeOfEvent 123456789
14 SecurityID 1234
22 Price 9760
30 Quantity 100
34 OrderID 1004
42 MatchID 9988
50 TradeCancelFlag 0
51 TradeSide 2
52 NumOfLegs 0
The client must update the quantity for OrderID 1004 in their orderbook. The orderbook should now
look like:
Page 92
Page 92
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
0 MsgSize 53
2 MsgType 350
4 MDSource EL
6 TimeOfEvent 123456789
14 SecurityID 1234
22 Price 9730
30 Quantity 500
34 OrderID 0003
42 MatchID 7766
50 TradeCancelFlag 0
51 TradeSide 1
52 NumOfLegs 0
Page 93
Page 93
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
0 MsgSize 53
2 MsgType 350
4 MDSource EL
6 TimeOfEvent 123456789
14 SecurityID 1234
22 Price 9730
30 Quantity 200
34 OrderID 0004
42 MatchID 7767
50 TradeCancelFlag 0
51 TradeSide 1
52 NumOfLegs 0
0 MsgSize 53
2 MsgType 350
4 MDSource EL
6 TimeOfEvent 123456789
14 SecurityID 1234
22 Price 9720
Page 94
Page 94
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
30 Quantity 100
34 OrderID 0002
42 MatchID 7768
50 TradeCancelFlag 0
51 TradeSide 1
52 NumOfLegs 0
The client must remove Orders 0003 and 0004, and update the quantity for OrderID 0002 in their
orderbook. The remaining Bid orders have their Orderbook position updated. The orderbook should
now look like:
- - - - - - - -
Page 95
Page 95
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Monthly and quarterly A three character month code with a two digit year code.
prompts
E.g. JUN20, JUL20, AUG20...AUG30
Specific Prompts DEC1 - the December monthly in the next calendar year
according to the current trading day
DEC2 - the December monthly in the second next calendar
year according to the current trading day
DEC3 - the December monthly in the third next calendar year
according to the current trading day
15M - the 3rd Wednesday (monthly) prompt that falls in the
month 15 months from the current month
27M - the 3rd Wednesday (monthly) prompt that falls in the
month 27 months from the current month
63M - the 3rd Wednesday (monthly) prompt that falls in the
month 63 months from the current month
127M - the 3rd Wednesday (monthly) prompt that falls in the
month 123 months from the current month
Page 96
Page 96
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
It is possible for a tradable instrument to have more than one prompt date label, however the Outright
Definition (301) message will only include one prompt date label. The precedence for which prompt
date label is published is:
Outright 0
Carry 1
Custom (Futures) 2
Carry Average 6
Call Spread 7
Put Spread 8
Custom (Options) 10
Page 97
Page 97
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Value Description
0 Request Accepted
1 Unknown/Unauthorized channel ID
Page 98
Page 98
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
10.1 Futures
An LME future is defined by a symbol and a maturity date, the prompt date. There are three different
types of prompt dates for futures:
Rolling prompt dates – these prompt dates are relative to the current trading day. When trades
in these contracts are sent to clearing, the date is “frozen” into a calendar date. The principle
rolling prompts are:
1) 3M (Three months) – this prompt date represents the settlement business day three
months from today.
2) CASH – this prompt date represents the settlement business day after tomorrow.
3) TOM (Tomorrow) – this prompt date represents tomorrow.
4) Near Month 1 – this is the first monthly prompt date after the CASH date
5) Near Month 2 – this is the second monthly prompt date after the CASH date
6) Near Month 3 - this is the third monthly prompt date after the CASH date. This date
must fall before the 3M date, and will not always be present.
Rolling prompt codes are present in the PromptType and PromptDateLabel fields in the Outright
Definition (301) message. Not all LME Metal Futures have rolling prompt dates.
The 3M date is not applicable to LME Precious Futures.
Single prompt dates - these prompt dates are calendar dates, written in the format YYYYMMDD,
where YYYY is the year, MM is the month (01-12) and DD is the day (01-31). The LME uses
the concept of “Monthly”, “Weekly”, “Daily” contracts, but all these contract types represent a
single prompt date, and there is no difference between them in LMEsource. (For “Monthly”
contracts, the prompt date is either the 3rd Wednesday in the month or the last Business Day
in the month. For “Weekly” contracts, the prompt date is the Wednesday in each week.)
Single prompt dates are present in the MaturityDate field in the Outright Definition (301) message.
LMEprecious Future “Quarterly” prompt dates are considered “Monthly” contracts in LMEsource.
To know what prompt dates that are available, it is necessary to have access to an LME trading
calendar. A quick and incomplete summary of the trading calendar is:
For a Base Metal Future, 3M and CASH are always present, and TOM is usually present. TOM is not
present if that date is a US national holiday. There is one prompt date per settlement business day
between the TOM and the 3M contract, thereafter a prompt date every Wednesday for 3 months, and
Page 99
Page 99
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
then prompt dates on the 3rd Wednesday of each month for a number of months, depending on the
underlying commodity. Average contracts are present that span the months after the 3M contract.
For LMEprecious Futures, CASH is always present, and TOM is usually present. TOM is not present
if that date is a US national holiday. There is an additional daily prompt on the settlement business
day after the CASH date. Thereafter there is a monthly prompt date on the 3 rd Wednesday of each
month for 24/25 months, followed by 12 quarterly prompts on the 3 rd Wednesday of the third month
(Mar, Jun, Sep, Dec) in each quarter.
For the index, there is one prompt date every 2 nd Wednesday in the month for 12 months. There are
no rolling prompts and no average prompts for the index.
For LMEminis, there exist one prompt date every 3rd Wednesday in the month for 12 months. There
are no rolling prompts for LMEminis.
For LME Monthly Cash Settled Futures (CSFs), there is one prompt date on the last working day of
each month. The CSF prompt date does not need to fall on a settlement business day.
For LME Monthly Average Futures (MAFs), there is one prompt date on the last working day of each
month. The MAF prompt date does not need to fall on a settlement business day.
10.3 TAPOs
A TAPO is defined by a symbol (only metals), an option type, a strike price and an expiration date. For
TAPOS, the only allowed expiration date is the single expiration date in format YYYYMMDD. There is
one expiration date per month on the last trading day of the month.
Page 100
Page 100
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
IOP (354)
Page 101
Page 101
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
IOP (354)
IOP (354)
Page 102
Page 102
LMEsource LMEsource Version 0.0Version 4.04
LME Classification: Public
Futures
Trade Match Trade (350) - 614 - 764 - 664
History
Options
Trade Match Trade (350) - 615 - - - -
History
* Match Trade and Order Execute messages are not published in these RFS channels. A replay of all
Match Trade (360) messages from SOD is published in the Trade history channels.
** Intraday Trade Statistics are only available to Level 2 and Level 3 participants.
Page 103
Page 103