Interface Specifications HKEx Orion Central Gateway Platform FIX

Interface Specifications HKEx Orion Central Gateway Platform FIX
Interface Specifications
HKEx Orion Central Gateway Platform
FIX Drop Copy Protocol
Version 1.1
21 December 2012
© Copyright 2012 HKEx
All Rights Reserved
Table of Contents
1.
Document Control .................................................................................................................................... 4
1.1 Change History ....................................................................................................................................... 4
2.
Introduction .............................................................................................................................................. 5
3.
Connectivity .............................................................................................................................................. 6
3.1
3.2
3.3
3.4
3.5
3.6
3.7
4.
Session .................................................................................................................................................... 6
Comp ID .................................................................................................................................................. 6
IP Address and Port Numbers ................................................................................................................. 6
Encryption .............................................................................................................................................. 6
Password ................................................................................................................................................ 7
Change Password ................................................................................................................................... 7
Failure and Recovery .............................................................................................................................. 7
Session Management ................................................................................................................................ 8
4.1
4.2
4.3
4.4
4.5
4.6
Establishing a FIX Session ....................................................................................................................... 8
Message Sequence Numbers ................................................................................................................. 8
Heart Beat and Test Request .................................................................................................................. 9
Terminating a FIX Session ....................................................................................................................... 9
Re-establishing a FIX Session .................................................................................................................. 9
Sequence Reset .................................................................................................................................... 10
4.6.1 During a Session ....................................................................................................................... 10
4.6.2 When starting a new Session ................................................................................................... 10
4.6.2.1 Reset Initiated by the Client........................................................................................................ 10
4.6.2.2 Reset Initiated by the OCG.......................................................................................................... 10
4.7 Fault Tolerance ..................................................................................................................................... 10
4.8 Checksum Validation ............................................................................................................................ 11
5.
Recovery ................................................................................................................................................. 12
5.1
5.2
5.3
5.4
5.5
General Message Recovery .................................................................................................................. 12
Resend Request .................................................................................................................................... 12
Logon Message Processing – Next Expected Message Sequence ........................................................ 12
Possible Duplicates ............................................................................................................................... 13
Possible Resends .................................................................................................................................. 13
5.5.1 Client Initiated Messages ......................................................................................................... 13
5.5.2 OCG Initiated Messages ........................................................................................................... 13
5.6 Gap Fills ................................................................................................................................................ 13
5.7 Transmission of Missed Messages........................................................................................................ 14
6.
Service Description ................................................................................................................................. 15
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
6.10
6.11
6.12
Data Types ............................................................................................................................................ 15
Security Identification .......................................................................................................................... 15
Party Identification ............................................................................................................................... 15
Client Order ID ...................................................................................................................................... 15
Board Lot Order Handling ..................................................................................................................... 15
Quote Handling .................................................................................................................................... 15
Odd Lot Order Handling........................................................................................................................ 16
Trade Report Handling ......................................................................................................................... 16
Execution ID .......................................................................................................................................... 16
Execution Reports................................................................................................................................. 16
Cancelled Auto-matched Trades .......................................................................................................... 17
Message Rejection ................................................................................................................................ 17
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 2 of 55
6.13 Copy Message Indicator ....................................................................................................................... 17
6.14 Session Contents .................................................................................................................................. 17
7.
Message Definitions................................................................................................................................ 19
7.1
7.2
7.3
7.4
7.5
7.6
Supported Message Types .................................................................................................................... 19
In-bound Messages .............................................................................................................................. 19
Out-bound Messages............................................................................................................................ 19
Message Header ................................................................................................................................... 20
Message Trailer .................................................................................................................................... 20
Administrative Messages...................................................................................................................... 21
7.6.1 Logon (A) .................................................................................................................................. 21
7.6.2 Logout (5) ................................................................................................................................. 22
7.6.3 Heartbeat (0) ............................................................................................................................ 22
7.6.4 Test Request (1) ....................................................................................................................... 22
7.6.5 Resend Request (2) .................................................................................................................. 22
7.6.6 Reject (3) .................................................................................................................................. 23
7.6.7 Sequence Reset (4)................................................................................................................... 23
7.7 Business Messages – Execution Reports (8) ......................................................................................... 25
7.7.1 Order Accepted ........................................................................................................................ 25
7.7.2 Order Cancelled ....................................................................................................................... 27
7.7.3 Order Cancelled – Unsolicited.................................................................................................. 29
7.7.4 Order Expired ........................................................................................................................... 31
7.7.5 Order Replaced ........................................................................................................................ 33
7.7.6 Trade (Board Lot / Odd Lot Order Executed) ........................................................................... 36
7.7.7 Board Lot/Odd Lot Trade Cancelled ......................................................................................... 38
7.8 Business Messages – Trade Reporting (AE) .......................................................................................... 41
7.8.1 Trade Accepted ........................................................................................................................ 41
7.8.2 Trade Cancelled ........................................................................................................................ 43
7.9 Infrastructure ....................................................................................................................................... 45
7.9.1 Business Message Reject (j) ..................................................................................................... 45
8.
Data Dictionary ....................................................................................................................................... 46
8.1 Session Level ......................................................................................................................................... 46
8.2 Business Level ....................................................................................................................................... 49
Appendices .................................................................................................................................................... 54
A. Password Policy ...................................................................................................................................... 55
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 3 of 55
1.
Document Control
1.1
Change History
Version
Number
Issue Date
Section Number
1.0
31 October 2012
All





1.1
21 December 2012





© Copyright of Hong Kong Exchanges and Clearing Limited
3.2 – Comp ID of HKEx
3.6 – Password Policy
6.5 – Board Lot Order Handling
7.7.1 – Order Accepted
7.7.3 – Execution Report - Order Cancelled
(Unsolicited)
7.7.7 – Board Lot/Odd Lot Trade Cancelled
7.8.1 – Trade Accepted
7.8.2 – Trade Cancelled
8 – Data Dictionary
Appendix A – Password Policy
Status
First Version
Revised Version
Page 4 of 55
2.
Introduction
This document describes the FIX interface protocol of the HKEx Orion Central Gateway
(“OCG”), the market access platform for the Securities market.
The OCG provides an application level interface to HKEx securities trading system (“AMS”)
for drop copy purpose.
The terminology used, message format, message flow and event models described
throughout this document are as per FIX 5.0 SP2 protocol specifications with HKEx specific
extension packs.
HKEx and/or its subsidiaries endeavour to ensure the accuracy and reliability of the information provided, but do
not guarantee its accuracy and reliability and accept no liability (whether in tort or contract or otherwise) for any
loss or damage arising from any inaccuracy or omission or from any decision, action or non-action based on or in
reliance upon information contained in this document.
No part of this document may be copied, distributed, transmitted, transcribed, stored in a retrieval system,
translated into any human or computer language, or disclosed to third parties without written permission from
HKEx.
HKEx reserves the right to amend any details in this document at any time, without notice.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 5 of 55
3.
Connectivity
3.1
Session
Exchange Participants connect their broker supplied systems (“BSS” or “Client”) to the OCG
via subscription to one or more OCG “Session”. This connection is a standard TCP/IP pointto-point connection.
EPs are expected to pre-register at least one IP address using which a client from their end
would establish a Trading Session with the OCG. EPs can optionally pre-register up to 3
additional IP addresses for each Session, for backup purposes.
A session can be established from only one of the pre-registered IP addresses for that
session. EPs can pre-register any given IP address for more than one session such that the
same BSS can be used to connect to OCG through one or more sessions.
3.2
Comp ID
The client should use the Comp ID (a unique session identifier) provided by HKEx for each
session in order to connect to the OCG. A single client may have multiple connections to the
OCG i.e., multiple FIX sessions, each with its own Comp ID.
The messages sent to the OCG should contain the Comp ID assigned to the client in the field
Comp ID in the header section.
CompID of the OCG, as set for TargetCompID of the client initiated messages &
SenderCompID of the OCG initiated messages is “HKEXCC”.
3.3
IP Address and Port Numbers
A FIX client is expected to hunt for a connection point (IP Address and Port Number) within a
pool of connection points provided by HKEx for the following OCG service.
At the time of the first logon for the day, the client is expected to attempt to connect to the
first connection point within the pool. If this first attempt is not succeeded or if the
connection is accepted but abruptly dropped by the OCG without any message before the
Logon message can be exchanged, then the client is expected to continue attempting the
connection points in the pool one by one in sequence until a successful connection and a FIX
session can be established. If a session could not be established having attempted all the
connection points in the pool, the client is expected to cycle back to the first connection
point then and retry.
During a reconnection within the same day the client can attempt to connect to the
identified connection point (IP and Port) through the connection hunting process in order to
re-establish the session, before moving to the other connection point.
HKEx will provide this pool of IP address and Port numbers through a separate medium.
3.4
Encryption
The OCG interface protocol expects password and new password be encrypted when they
are sent in the Logon message from the client to the OCG.
To encrypt the password, the client is expected to use a 2048-bit RSA
(http://en.wikipedia.org/wiki/RSA_(algorithm)) public key circulated (through a different
medium) by HKEx. The binary output of the RSA encryption must be converted to an
alphanumeric
value
by
means
of
standard
base-64
encoding
(http://en.wikipedia.org/wiki/Base64) when communicating with the OCG.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 6 of 55
HKEx may periodically renew the public key used by the client and after a public key renewal;
a client may continue to use the old key for a limited grace period. Both keys may be used
during this time.
3.5
Password
The client should specify their password in the EncryptedPassword (1402) field of the Logon
(35=A) message. This password must be in encrypted form.
The status of the password (i.e. whether it is accepted or rejected) will be specified in the
SessionStatus (1409) field of the Logon (35=A) sent by the OCG to confirm the establishment
of a FIX connection.
Repeated failures in password validation may force HKEx to lock the client; the EP is
expected to contact HKEx to unlock the client and reset the password.
3.6
Change Password
Each new Comp ID will be assigned a password on registration. The client is expected to
change the password upon first logon whenever a password is (re)issued by HKEx.
Password change request can be made together with Logon (35=A) request. The client
should specify the encrypted new password in the EncryptedNewPassword (1404) field and
the current encrypted password in the EncryptedPassword (1402) field.
The new password must comply with HKEx password policy (refer to Appendix A). The status
of the new password (i.e. whether it is accepted or rejected) will be specified in the
SessionStatus (1409) field of the Logon sent by the OCG to confirm the establishment of a
FIX connection. The new password will, if accepted, be effective for subsequent logins.
The client is expected to change the password periodically. HKEx may set expiry duration for
the password; a reminder may be sent indicating that the password is to about to expire,
through the Text (58) field in the Logon (35=A) response. Once the password has expired for
a client, that client will not be allowed to logon, and the EP is expected to contact HKEx to
unlock the client.
3.7
Failure and Recovery
The system has been designed with fault tolerance and disaster recovery technology that
ensures that trading should continue in the unlikely event of a process or server outage.
If the client is unexpectedly disconnected, it should attempt to re-connect to the OCG before
attempting to follow the connection mechanism described in Section 3.3.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 7 of 55
4.
Session Management
4.1
Establishing a FIX Session
Each client will use one of the IP address and port sets provided to establish a TCP/IP
connection with the OCG. The client will initiate a FIX session at the start of each trading day
by sending the Logon (35=A) message.
A client must identify itself by providing its Comp ID in SenderCompID (49) field. The OCG
will validate this SenderCompID, password and IP address of the client.
Once the client is authenticated, the OCG will respond with a Logon (35=A) message with
SessionStatus (1409) set to 0 = Session Active. If the client’s Logon message included the
field NewEncryptedPassword and the client is authenticated, the OCG will respond with a
Logon message with SessionStatus (1409) set to 1 = Session Password Changed.
The client must wait for the Logon from the OCG before sending additional messages. If
additional messages are received from the client before the exchange of Logon messages,
the TCP/IP connection with the client will be disconnected.
If a logon attempt fails for the following reasons, the OCG will send a Logout (35=5) or a
Reject (35=3) and then terminate the session:

Password failure

Comp ID is locked

Logon is not permitted during this time
For all other reasons, including the following, the OCG will terminate the session without
sending a Logout or Reject:

Invalid Comp ID or IP address
If during a logon of a Comp ID, the OCG receives a second connection attempt while a valid
FIX session is already underway for that same Comp ID, the OCG will terminate both
connections without sending a Logout or Reject message.
Inbound message sequence number will not be incremented if the connection is abruptly
terminated due to the logon failure.
If a session level failure occurs due to a message sent by the client that contains a sequence
number that is less than what is expected and the PossDup (43) is not set to Y = Yes, then the
OCG will send a Logout message and terminate the FIX connection. In this scenario the
inbound sequence number will not be incremented.
If the OCG does not respond to the session initiation (client initiated Logon message), the
client is expected to wait for a time period of 60 seconds prior to terminating the connection.
The client is expected to retry session initiation after an elapsed time period of 60 seconds.
If a client is disconnected abruptly or via a Logout message (35=5) from the OCG, the client is
expected to wait for a time period of 10 seconds prior to reconnecting to the OCG.
4.2
Message Sequence Numbers
As outlined in the FIX protocol, the client and OCG will each maintain a separate and
independent set of incoming and outgoing message sequence numbers. Sequence numbers
should be initialized to 1 (one) at the start of the day and be incremented throughout the
session. Either side of a FIX session will track the:
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 8 of 55

NextExpectedMsgSeqNum (789) (starting at 1)

Next To Be Sent Message Sequence number (starting at 1); with respect to the
contra-party.
Monitoring sequence numbers will enable parties to identify and react to missed messages
and to gracefully synchronize applications when reconnecting during a FIX session.
Any message sent by either side of a FIX session will increment the sequence number unless
explicitly specified for a given message type.
If any message sent by one side of a FIX session contains a sequence number that is LESS
than the NextExpectedMsgSeqNum (789) then the other side of this session is expected to
send a Logout message and terminate the FIX connection immediately, unless the PossDup
flag is set to Y = Yes
A FIX session will not be continued to the next trading day. Both sides are expected to
initialize (reset to 1) the sequence numbers at the start of each day. At the start of each
trading day if the client starts with a sequence number greater than 1 then the OCG will
terminate the session immediately without any further exchange of messages.
4.3
Heart Beat and Test Request
The client and the OCG will use the Heartbeat (35=0) message to monitor the
communication line during periods of inactivity and to verify that the interfaces at each end
are available.
The heartbeat interval as in HeartBtInt (108) is recommended to be set as 20 Seconds.
The OCG will send a Heartbeat anytime it has not transmitted a message for the heartbeat
interval. The client is expected to employ the same logic.
If the OCG detects inactivity for a period longer than 3 heartbeat intervals, it will send a Test
Request message to force a Heartbeat from the client. If a response to the Test Request
(35=1) is not received within a reasonable transmission time (recommended being an
elapsed time equivalent to 3 Heartbeat intervals), the OCG will send a Logout (35=5) and
break the TCP/IP connection with the client. The client is expected to employ similar logic if
inactivity is detected on the part of the OCG.
4.4
Terminating a FIX Session
Session termination can be initiated by either the OCG or the client by sending a Logout
message. Upon receiving the Logout request, the contra party will respond with a Logout
message signifying a Logout reply. Upon receiving the Logout reply, the receiving party will
terminate the connection.
If the contra-party does not reply with either a Resend Request or a Logout reply, the Logout
initiator should wait for 60 seconds prior to terminating the connection.
The client is expected to terminate each FIX connection at the end of each trading day
before the OCG service is shut down. However, all open FIX connections will be terminated
(a Logout message will be sent) by the OCG when its service is shut down. Under exceptional
circumstances the OCG may initiate the termination of a connection during the trading day
by sending the Logout message.
If, during the exchange of Logout messages, the client or the OCG detects a sequence gap, it
should send a Resend Request.
4.5
Re-establishing a FIX Session
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 9 of 55
If a FIX connection is terminated during the trading day it may be re-established via an
exchange of Logon messages.
Once the FIX session is re-established, the message sequence numbers will continue from
the last message successfully transmitted prior to the termination.
4.6
Sequence Reset
The sequence reset could be done in two modes;
1. Gap-fill mode:
Gap-fill mode is expected to be used by one side when skipping session level messages
which can be ignored by the other side.
2. Reset mode:
Reset mode is used only in exceptional scenarios to indicate a reset in the session’s
starting sequence number. This mode can ONLY be used by the OCG. Client initiated
resets would be rejected by the OCG.
Following scenarios exist:
4.6.1
During a Session
The OCG and the client may use the Sequence Reset (35=4) message in Gap Fill mode if
either side wishes to increase the expected incoming sequence number of the other party.
The OCG may also use the Sequence Reset message in Sequence Reset mode if it wishes to
increase the expected incoming sequence number of the other party. The Sequence Reset
mode should only be used to recover from an emergency situation. It should not be relied
upon as a regular practice.
4.6.2
When starting a new Session
4.6.2.1 Reset Initiated by the Client
Reset sequence (reset to 1) through the Logon Message will not be facilitated by the OCG. In
order to reset the sequence (reset to 1), the client should manually inform the HKEx
Operations Desk.
4.6.2.2 Reset Initiated by the OCG
The system has been designed with fault tolerance and disaster recovery technology that
should ensure that the OCG retains its incoming and outgoing message sequence numbers
for each client in the unlikely event of an outage. However, the client is required to support
a manual request by HKEx to initialize sequence numbers prior to the next login attempt.
4.7
Fault Tolerance
After a failure on client side or on OCG side, the client is expected to be able to continue the
same session.
In case of a catastrophic scenario, the FIX gateway will restart from a higher sequence
number considering the previous session or may start from sequence number 1.
If the sequence number is reset to 1 by the OCG, all previous messages will not be available
for the client side.
The client and the OCG are expected to negotiate on the NextExpectedMsgSeqNum (789)
and Next To Be Received Sequence number through an alternate medium prior to initiating
the new session (Manually setting the sequence number for both ends after having a direct
communication with the client).
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 10 of 55
4.8
Checksum Validation
The OCG performs a checksum validation on all incoming messages. Incoming messages that
fail the checksum validation will be rejected and the connection will be dropped by the OCG
without sending a logout.
Conversely, in case of a checksum validation failure, the client is expected to drop the
connection and take any appropriate action before reconnecting.
Messages that fail the checksum validation should not be processed.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 11 of 55
5.
Recovery
5.1
General Message Recovery

A gap is identified when an incoming message sequence number is found to be greater
than NextExpectedMsgSeqNum (789).

The Resend Request will indicate the BeginSeqNo (7) and EndSeqNo (16) of the message
gap identified and when replying to a Resend Request, the messages are expected to be
sent strictly honouring the sequence.

If messages are received outside of the BeginSeqNo and EndSeqNo, then the recovering
party is expected to queue those messages until the gap is recovered.
During the message recovery process, the recovering party will increment the Next
Expected Sequence number accordingly based on the messages received. If messages
applicable to the message gap are received out of sequence then the recovering party
will drop these messages.

The party requesting the Resend Request can specify “0” in the EndSeqNo to indicate
that they expect the sender to send ALL messages starting from the BeginSeqNo.
In this scenario, if the recovering party receives messages with a sequence greater than
the BeginSeqNo, out of sequence, the message will be ignored.

Administrative messages such as Sequence Reset, Heartbeat and Test Request which can
be considered irrelevant for a retransmission could be skipped using the Sequence Reset
message in gap-fill mode.
Note that the OCG expects the client to skip Sequence Reset messages when replying to
a Resend Request at all times.

When resending messages, the OCG would use either PossDup or PossResend flag to
indicate whether the messages were retransmitted earlier.
If PossDup flag is set Y = Yes, it indicates that the same message with the given sequence
number with the same business content may have been transmitted earlier.
In the case where PossResend flag is set to Y = Yes, it indicates that the same business
content may have been transmitted previously but under the different message
sequence number. In this case business contents needs to be processed to identify the
resend. For example, in Execution Reports the ExecID (17) may be used for this purpose.
5.2
Resend Request
The client may use the Resend Request message to recover any lost messages. This message
may be used in one of three modes:
5.3
(i)
To request a single message. The BeginSeqNo and EndSeqNo should be the same.
(ii)
To request a specific range of messages. The BeginSeqNo should be the first
message of the range and the EndSeqNo should be the last of the range.
(iii)
To request all messages after a particular message. The BeginSeqNo should be the
sequence number immediately after that of the last processed message and the
EndSeqNo should be zero (0).
Logon Message Processing – Next Expected Message Sequence
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 12 of 55
The session initiator should supply the NextExpectedMsgSeqNum (789) the value next
expected from the session acceptor in MsgSeqNum (34). The session acceptor should
validate the logon request including that NextExpectedMsgSeqNum (789) does not
represent a gap. It then constructs its logon response with NextExpectedMsgSeqNum (789)
containing the value next expected from the session initiator in MsgSeqNum (34) having
incremented the number above the logon request if that was the sequence expected.
The session initiator must wait until the logon response is received in order to submit
application messages. Once the logon response is received, the initiator must validate that
NextExpectedMsgSeqNum (789) does not represent a gap.
In case of gap detection from either party (lower than the next to be assigned sequence)
recover all messages from the last message delivered prior to the logon through the
specified NextExpectedMsgSeqNum (789) sending them in order, then gap fill over the
sequence number used in logon and proceed sending newly queued messages with a
sequence number one higher than the original logon.
Neither side should generate a resend request based on MsgSeqNum (34) of the incoming
Logon message but should expect any gaps to be filled automatically by following the Next
Expected Sequence processing described above.
Note that indicating the NextExpectedMsgSeqNum (789) in the Logon (35=A) is mandatory.
5.4
Possible Duplicates
The OCG handles possible duplicates according to the FIX protocol. The client and the OCG
use the PossDupFlag (43) field to indicate that a message may have been previously
transmitted with the same MsgSeqNum (34).
5.5
Possible Resends
5.5.1
Client Initiated Messages
The OCG does not handle possible resends for the client-initiated messages and the message
will be processed without considering the value in the PossResend (97) field.
5.5.2
OCG Initiated Messages
The OCG may use the PossResend (97) field to indicate that an application message may
have already been sent under a different MsgSeqNum (34). The client should validate the
contents (e.g., ExecID (17)) of such a message against those of messages already received
during the current trading day to determine whether the new message should be ignored or
processed.
5.6
Gap Fills
The following messages are expected to be skipped using gap-fills when being retransmitted:
1. Logon
2. Logout
3. Heartbeat
4. Test Request
5. Resent Request
6. Sequence Reset
All other messages are expected to be replayed within a retransmission.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 13 of 55
5.7
Transmission of Missed Messages
The Execution Report & Trade Capture Reports messages generated during a period when a
client is disconnected from the OCG will be sent to the client when it next reconnects. In the
unlikely event the disconnection was due to an outage of the OCG, all such messages will
include a PossResend (97) set to Y = Yes.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 14 of 55
6.
Service Description
6.1
Data Types
Data Types used are based on the published standard FIX specifications.
6.2
Security Identification
Instruments will be identified using the SecurityID (48) field. It is required to specify
SecurityIDSource (22) as Exchange Symbol (8) and SecurityExchange (207) as XHKG (FIX
exchange code for HKEx).
6.3
Party Identification
Party Identification is defined as follows:
6.4
ID
Description
FIX Tag and Value
Broker ID
Identifier of the member the interest is
submitted under
PartyRole (452)=1 and
PartyID (448)
Submitting Broker ID
Identifier of the entering member the interest is
submitted under, if different from Broker ID
mentioned above
PartyRole (452)=36 and
PartyID (448)
Contra Broker ID
Identifier of the Contra member the interest is
submitted under
PartyRole (452)=17 and
PartyID (448)
BS User ID
The location ID of the member as referred to by
Broker ID or Submitting Broker ID
PartyRole (452)=75 and
PartyID (448)
Client Order ID
In a drop copy message ClOrdID (11) field will be provided only if the original message
submitted through the Trading interface had this field. The same rule is applicable to
OrigClOrdID (41).
6.5
Board Lot Order Handling
Order book updates such as new board (i.e., round) lot orders, board lot order cancels,
board lot order amends, resultant trades, trade cancels etc. will be published to the drop
copy clients using Execution Report (35=8)message.
For Non-CG originated Order Cancel/Replace:
6.6

Drop Copy will send two execution reports, one for the cancellation of the original
order followed by the acknowledgement of the Replaced Order (if applicable).

The Cancellation due to Cancel/Replace will be treated as an Unsolicited
Cancellation (Exec Restatement Reason = 100)

In the Execution Report sent for the acknowledgment of the Replaced order, the
cumulative quantity will be specified as 0 and order quantity and leaves quantity
will be equal to the open order quantity at the market due to the amend request.

In a case where the Replaced order is rejected, only the cancellation of the original
order will be reported to the drop copy client
Quote Handling
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 15 of 55
The Execution Report (35=8) message is used to notify the drop copy client if a quote is
accepted, or updated, cancelled or executed; each side (54) within a quote is considered as a
board (i.e., round) lot order.
6.7
Odd Lot Order Handling
Order book updates such as new odd lot orders, odd lot order cancels, resultant trades,
trade cancels etc. will be published to the drop copy clients using Execution Report (35=8)
message.
6.8
Trade Report Handling
Trade Capture Report (35=AE) message is used to notify the drop copy client when an offexchange trade is reported or an already reported off-exchange trade is cancelled
successfully.
6.9
Execution ID
The OCG will use the ExecID (17) field to affix a unique identifier for each Execution Report.
ExecID value will be unique per trading day.
6.10 Execution Reports
The Execution Report (35=8) message is used to communicate many different events to the
drop copy client. The events are differentiated by the value in the ExecType (150) field as
outlined below:
ExecType (150)
Description
OrdStatus (39)
0 = New
Order Accepted

0 = New

C = Expired
Order Executed (Trade)

1 = Partially Filled
Indicates that an order has been partially or
fully filled. The execution details (e.g., price and
quantity) are specified.

2 = Filled
Order Cancelled

4 = Cancelled
Order Replaced

0 = New
Indicates that an Order Cancel/Replace Request
has been accepted and successfully processed.

1 = Partially Filled

2 = Filled
Trade Cancel

1 = Partially Filled
Indicates that an execution has been cancelled
by Market Operations. The message will include
an ExecRefID to identify the execution being

2 = Filled

4 = Cancelled

C = Expired
Indicates that a new order has been accepted.
C = Expired
Order Expired
Indicates that an order has been expired.
OrigClOrdID field will not be provided in this
Execution Report.
F = Trade
4 = Cancelled
Indicates that an Order Cancel Request has
been accepted and successfully processed.
This message can also be sent unsolicited in
which case the Execution Report may include
the ExecRestatementReason field to indicate
the reason for cancellation; OrigClOrdID field
will not be provided.
5 = Replaced
H = Trade Cancel
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 16 of 55
ExecType (150)
Description
OrdStatus (39)
cancelled and the updated execution details
(e.g., price and quantity).
6.11 Cancelled Auto-matched Trades
A trade already concluded for an order could be cancelled by the HKEx Market Operations. A
trade cancel will be communicated to the client(s) via an Execution Report (35=8). The
Execution Report will include the ExecRefID (19) in order to identify the particular trade
which is being cancelled. If a trade is cancelled in this manner, system will not reinstate the
LeavesQty (151) of that order by the busted (cancelled) quantity. In this specific scenario
OrderQty (38) will NOT be equal to the summation of the LeavesQty (151) + CumQty (14) –
cumulative executed quantity.
6.12 Message Rejection
If an incoming message violates any message level validations such as data type mismatches
or message structure mismatches, the messages are expected to be rejected back to the
sender using a Reject (35=3) message (applicable to both the client and the OCG) and
Business Message Reject (35=j) from the OCG.
6.13 Copy Message Indicator
CopyMsgIndicator (797) field will be set to Y = Yes for each message sent through the drop
copy sessions in order to indicate that the given message is a drop copy of another message.
6.14 Session Contents
A drop copy connection is configured to receive a copy of all the Execution Reports (35=8)
and Trade Capture Reports (35=AE) generated for the Broker ID(s) assigned to the drop copy
session, irrespective of the access platform (e.g., Terminal, Open Gateway, OCG Trading
service) used by the given Broker ID for trading. However, any rejection message related to
order, order cancel, order cancel/replace, quote or trade capture report will not be part of
the drop copy.
The drop copy client may have the privilege to subscribe to one of the following drop copy
options:

Trades Only
Under ‘Trades only’ option, the client will have access to Execution Reports related to
auto-matched trades, Trade Capture reports and Odd-lot trades.

Orders & Trades
Under ‘Orders & Trades’ option, the client will have access to all order (board and oddlot), quote related Execution Reports and Trade Capture reports
A drop copy client must choose the required option when subscribing to the drop copy
service with HKEx market operations. This option can’t be changed intra-day.
The following table describes the contents for the two subscription options:
Business Message Type
Order and Trades
Option
Trades Only
Option
Execution Report (35=8)
Exec Type = New
© Copyright of Hong Kong Exchanges and Clearing Limited

X
Page 17 of 55
Business Message Type
Order and Trades
Option
Trades Only
Option
Exec Type = Expired

X
Exec Type = Cancelled

X
Exec Type = Replaced

X
Exec Type = Trade


Exec Type = Trade Cancel


Trade Accepted


Trade Cancelled


Trade Capture Report (35=AE)
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 18 of 55
7.
Message Definitions
7.1
Supported Message Types
All supported message types initiated by the client or the OCG:
Message
1.
Heartbeat
0
Allows the client and the OCG to exercise the
communication line during periods of inactivity
and verify that the interfaces at each end are
available.
2.
Test Request
1
Allows the client or the OCG to request a
response from the other party if inactivity is
detected.
3.
Resend Request
2
Allows for the recovery of messages lost during a
malfunction of the communications layers.
4.
Reject
3
Used to reject a message that does not comply
with session level validations.
5.
Sequence Reset
4
Allows the client or the OCG to increase the
expected incoming sequence number of the
other party.
6.
Logon
A
Allows the client and the OCG to establish a FIX
session.
7.
Logout
5
Allows the client and the OCG to terminate a FIX
session.
8.
Business Message Reject
j
Indicates that an application message could not
be processed
9.
Execution Report
8
Indicates one of the following:
10.
7.2
Message
Type
#
Trade Capture Report
AE
Usage

Order Accepted

Order Expired

Order Cancelled

Order Replaced

Trade

Trade Cancel
Indicates one of the following:

Trade Submit

Trade Cancel
In-bound Messages
Only Session-level messages are expected.
7.3
Out-bound Messages
In addition to the Session-level messages, the following lists the messages that are sent by
the OCG to the client:
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 19 of 55
1. Execution Report (35=8)
2. Trade Capture Report (35=AE)
7.4
Message Header
All messages exchanged between the client and the OCG have the following standard
message header:
FIX Tag
Field Name
Required?
Description
8
BeginString
Y
Always FIXT.1.1
9
BodyLength
Y
Number of bytes after this field up to and
including the delimiter immediately
preceding the CheckSum.
35
MsgType
Y
Message type.
49
SenderCompID
Y
Comp ID of the party sending the message.
56
TargetCompID
Y
Comp ID of the party the message is sent to.
34
MsgSeqNum
Y
Sequence number of the message.
43
PossDupFlag
N
Indicates whether the message was
previously transmitted under the same
MsgSeqNum (34).
Absence of this field is interpreted as original
transmission (N).
97
PossResend
N
Indicates whether the message was
previously transmitted under a different
MsgSeqNum (34).
Absence of this field is interpreted as original
transmission (N).
52
SendingTime
Y
Time the message was transmitted.
122
OrigSendingTime
N
Time the message was originally transmitted.
If the original time is not available, this
should be the same value as SendingTime
(52).
Required if PossDupFlag (43) is Possible
Duplicate (Y).
1128
ApplVerID
N
Version of FIX used in the message:

9 = FIX50SP2
Required if the message is generated by the
OCG.
7.5
Message Trailer
All messages exchanged between the client and the OCG have the following standard
message trailer:
FIX Tag
10
Field Name
CheckSum
Required?
Y
Description
Standard check sum described by FIX
protocol.
Always last field in the message; i.e. serves,
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 20 of 55
FIX Tag
Field Name
Required?
Description
with the trailing <SOH>, as the end-ofmessage delimiter.
Always defined as three characters.
7.6
Administrative Messages
7.6.1
Logon (A)
This message is initiated by the client and the OCG may respond with the same message.
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
A = Logon
Y
Method of encryption.
Message Body
98
EncryptMethod

0 = None/Other
108
HeartBtInt
Y
Indicates the heartbeat interval in seconds.
789
NextExpectedMsgSeqNum
Y
Next expected MsgSeqNum value to be received.
1400
EncryptedPasswordMethod
N
Enumeration defining the encryption method used
to encrypt password fields:

101 = RSA
1401
EncryptedPasswordLen
N
Length of the EncryptedPassword (1402) field
1402
EncryptedPassword
N
Encrypted password – encrypted via the method
specified in EncryptedPasswordMethod (1400)
1403
EncryptedNewPasswordLen
N
Length of the EncryptedNewPassword (1404) field
1404
EncryptedNewPassword
N
Encrypted new password – encrypted via the
method specified in EncryptedPasswordMethod
(1400)
1409
SessionStatus
N
Status of the FIX session.
Required if the message is generated by the OCG.
1137
DefaultApplVerID
Y
Default version of FIX messages used in this
session:

464
TestMessageIndicator
N
9 = FIX50SP2
Can be used to specify that this FIX session will be
sending and receiving "test" vs. "production"
messages
Only applicable for Logon (35=A) message from the
OCG to the client.
58
Text
N
Text field will be used to convey the number of
days to password expiry when the OCG replies with
a Logon (35=A) message upon a successful logon
attempt.
Message Trailer
Password (1402) must be present in the Logon message (35=A) initiated by the client.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 21 of 55
7.6.2
Logout (5)
This message can be initiated by both client and the OCG.
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
5 = Logout
N
Status of the FIX session.
Message Body
1409
SessionStatus
Required if the message is generated by the OCG.
58
Text
N
Textual reason for the logout.
Message Trailer
7.6.3
Heartbeat (0)
This message can be initiated by both client and OCG.
FIX Tag
Field Name
Required?
Description
Y
0= Heartbeat
N
Required if the heartbeat is a response to a
TestRequest (35=1). The value in this field should
echo the TestReqID (112) received in the
TestRequest .
Message Header
35
MsgType
Message Body
112
TestReqID
Message Trailer
7.6.4
Test Request (1)
This message can be initiated by both the client and the OCG.
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
1= Test Request
Y
Identifier included in Test Request message to be
returned in resulting Heartbeat.
Message Body
112
TestReqID
Message Trailer
7.6.5
Resend Request (2)
This message can be initiated by both client and the OCG.
FIX Tag
Field Name
Required?
Description
Message Header
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 22 of 55
35
MsgType
Y
2= Resend Request
Message Body
7
BeginSeqNo
Y
Sequence number of the first message expected to
be resent.
16
EndSeqNo
Y
Sequence number of the last message expected to
be resent.
This may be set to 0 to request the sender to
transmit ALL messages starting from BeginSeqNo
(7).
Message Trailer
7.6.6
Reject (3)
This message is initiated by the OCG.
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
3= Reject
Message Body
45
RefSeqNum
Y
Sequence number of the message which caused
the rejection
371
RefTagID
N
If a message is rejected due to an issue with a
particular field its tag number will be indicated.
372
RefMsgType
N
Message type of the rejected message.
373
SessionRejectReason
N
Code specifying the reason for the reject:















58
Text
N
0 = Invalid Tag Number
1 = Required Tag Missing
2 = Tag not defined for this message
3 = Undefined tag
4 = Tag specified without a value
5 = Value is incorrect (out of range) for this tag
6 = Incorrect data format for value
9 = CompID problem
10 = Sending Time Accuracy problem
11 = Invalid Msg Type
13 = Tag appears more than once
15 = Repeating group fields out of order
16 = Incorrect NumInGroup count for
repeating group
18 = Invalid/Unsupported Application Version
99 = Other
Text specifying the reason for the rejection.
Message Trailer
7.6.7
Sequence Reset (4)
This message can be initiated by both client and the OCG.
FIX Tag
Field Name
Required?
Description
Message Header
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 23 of 55
35
MsgType
Y
4= Sequence Reset
Message Body
36
NewSeqNo
Y
Sequence number of the next message to be
transmitted.
123
GapFillFlag
N
Mode in which the message is being used.
Absence of this field is interpreted as Sequence
Reset (N).
Message Trailer
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 24 of 55
7.7
Business Messages – Execution Reports (8)
7.7.1
Order Accepted
The OCG will send this execution report once a new order (Board or Odd lot) has been
accepted.
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
8 = Execution Report
Message Body
11
ClOrdID
N
Client specified identifier of the order.
37
OrderID
Y
Order ID as assigned by the exchange.
17
ExecID
Y
Unique Execution ID assigned for each Execution
Report generated.
Component Block <Trading Party>
453

448
NoPartyIDs
Y
Number of party identifiers. The value in this field
can be 1 or 2.
PartyID
Y
ID of the Broker client submitting the order:
Broker ID/BS User ID.

447
PartyIdSource
Y
Defines the naming convention used in specifying
the PartyID (448):


452
PartyRole
Y
D = Proprietary/Custom Code
Role of the specified PartyID (448):


1 = Executing Firm (Broker ID that submitted
the order)
75 = Location ID (BS User ID)
End Component Block
Component Block <Instrument>
48
SecurityID
Y
Instrument identifier
22
SecurityIDSource
N
Identifies the source of the SecurityID (48):

8 = Exchange Symbol
Required if:
SecurityID (48) is specified
207
SecurityExchange
N
The market which is used to identify the security:

XHKG
Required if:
SecurityIDSource (22) = 8 (Exchange Symbol).
End Component Block
40
OrdType
N
Order type applicable to the order:


© Copyright of Hong Kong Exchanges and Clearing Limited
1 = Market
2 = Limit
Page 25 of 55
59
TimeInForce
N
Time qualifier of the order:




0 = Day (Default)
3 = Immediate or Cancel = IOC
4 = Fill or Kill = FOK
9 = At Crossing. Applicable for orders in
Auction session.
Absence of this field is interpreted as 0 = Day.
54
Side
Y
Side of the order



1 = Buy
2 = Sell
5 = Sell Short
38
OrderQty
N
Total order quantity of the order
44
Price
N
Price of order.
Required if:
OrdType (40) = 2 (Limit).
60
TransactTime
Y
The time at which the particular message was
generated.
528
OrderCapacity
N
Designates the capacity of the firm placing the
order:


529
OrderRestrictions
N
A = Agency
P = Principal
Restrictions associated with this order:



2 = Index Arbitrage
5 = Acting as Market Maker or Specialist in
Security
6 = Acting as Market Maker or Specialist in
underlying of a derivative security
The above 3 values are applicable only if Side (54) =
5 (Sell Short)
1090
MaxPriceLevels
N
Maximum number of price levels to trade through.
Applicable if:
Order Type (40) = 2 (Limit).
If present, this should be set as 1.
77
PositionEffect
N
Indicates whether the resulting position after a
trade should be an opening position or closing
position:

1 = Close
Applicable only if:
Side (54) = 1 (Buy) to indicate covering a short
sell.
39
OrdStatus
Y
Order Status after applying the transaction that is
being communicated:

150
ExecType
Y
0 = New
Execution Type that indicates the reason for the
generation of the Execution Report:

0 = New
14
CumQty
Y
Cumulative execution size
151
LeavesQty
Y
Open order quantity
58
Text
N
Free Text
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 26 of 55
1093
LotType
N
Lot Type of the order:


1 = Odd Lot
2 = Round Lot
Absence of this field indicates a Round (i.e., Board)
Lot order.
797
CopyMsgIndicator
Y
Indicates whether or not this message is a drop
copy of another message.
Always set to Y.
Message Trailer
7.7.2
Order Cancelled
The OCG sends this execution report once the request to cancel an order has been accepted.
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
8 = Execution Report
Message Body
11
ClOrdID
N
Client specified identifier of the order cancel
request.
41
OrigClOrdID
N
Original client specified identifier for the incoming
cancel request
37
OrderID
Y
Order ID as assigned by the exchange.
17
ExecID
Y
Unique Execution ID assigned for each Execution
Report generated.
Component Block <Trading Party>
453

448
NoPartyIDs
Y
Number of party identifiers. The value in this field
can be 1 or 2.
PartyID
Y
ID of the Broker client submitting the order:
Broker ID/BS User ID.

447
PartyIdSource
Y
Defines the naming convention used in specifying
the PartyID (448):


452
PartyRole
Y
D = Proprietary/Custom Code
Role of the specified PartyID (448):


1 = Executing Firm (Broker ID that submitted
the order)
75 = Location ID (BS User ID)
End Component Block
Component Block <Instrument>
48
SecurityID
Y
Instrument identifier
22
SecurityIDSource
N
Identifies the source of the SecurityID (48):

8 = Exchange Symbol
Required if:
SecurityID (48) is specified
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 27 of 55
207
SecurityExchange
N
The market which is used to identify the security:

XHKG
Required if:
SecurityIDSource (22) = 8 (Exchange Symbol).
End Component Block
40
OrdType
N
Order type applicable to the order:


59
TimeInForce
N
1 = Market
2 = Limit
Time qualifier of the order:




0 = Day (Default)
3 = Immediate or Cancel = IOC
4 = Fill or Kill = FOK
9 = At Crossing. Applicable for orders in
Auction session.
Absence of this field is interpreted as 0 = Day.
54
Side
Y
Side of the order



1 = Buy
2 = Sell
5 = Sell Short
38
OrderQty
N
Total order quantity of the order
44
Price
N
Price of order.
Required if:
OrdType (40) = 2 (Limit).
60
TransactTime
Y
The time at which the particular message was
generated.
528
OrderCapacity
N
Designates the capacity of the firm placing the
order:


529
OrderRestrictions
N
A = Agency
P = Principal
Restrictions associated with this order:



2 = Index Arbitrage
5 = Acting as Market Maker or Specialist in
Security
6 = Acting as Market Maker or Specialist in
underlying of a derivative security
The above 3 values are applicable only if Side (54) =
5 (Sell Short)
1090
MaxPriceLevels
N
Maximum number of price levels to trade through.
Applicable if:
OrdType (40) = 2 (Limit).
If present, this should be set as 1.
77
PositionEffect
N
Indicates whether the resulting position after a
trade should be an opening position or closing
position:

1 = Close
Applicable only if:
Side (54) = 1 (Buy) to indicate covering a short
sell.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 28 of 55
39
OrdStatus
Y
Order Status after applying the transaction that is
being communicated:

150
ExecType
Y
4 = Cancelled
Execution Type that indicates the reason for the
generation of the Execution Report:

4 = Cancelled
14
CumQty
Y
Cumulative execution size
151
LeavesQty
Y
Open order quantity
58
Text
N
Free Text
LotType
N
Lot Type of the order:
1093


1 = Odd Lot
2 = Round Lot
Absence of this field indicates a Round (i.e., Board)
Lot order.
797
CopyMsgIndicator
Y
Indicates whether or not this message is a drop
copy of another message.
Always set to Y.
Message Trailer
7.7.3
Order Cancelled – Unsolicited
The OCG will send this execution report for an unsolicited cancel of an order.
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
8 = Execution Report
Message Body
11
ClOrdID
N
Client specified identifier of the order.
37
OrderID
Y
Order ID as assigned by the exchange.
17
ExecID
Y
Unique Execution ID assigned for each Execution
Report generated.
Component Block <Trading Party>
453

448
NoPartyIDs
Y
Number of party identifiers. The value in this field
can be 1 or 2.
PartyID
Y
ID of the Broker client submitting the order:
Broker ID/BS User ID.

447
PartyIdSource
Y
Defines the naming convention used in specifying
the PartyID (448):


452
PartyRole
Y
D = Proprietary/Custom Code
Role of the specified PartyID (448):


1 = Executing Firm (Broker ID that submitted
the order)
75 = Location ID (BS User ID)
End Component Block
Component Block <Instrument>
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 29 of 55
48
SecurityID
Y
Instrument identifier
22
SecurityIDSource
N
Identifies the source of the SecurityID (48):

8 = Exchange Symbol
Required if:
SecurityID (48) is specified
207
SecurityExchange
N
The market which is used to identify the security:

XHKG
Required if:
SecurityIDSource (22) = 8 (Exchange Symbol).
End Component Block
40
OrdType
N
Order type applicable to the order:


59
TimeInForce
N
1 = Market
2 = Limit
Time qualifier of the order:




0 = Day (Default)
3 = Immediate or Cancel = IOC
4 = Fill or Kill = FOK
9 = At Crossing. Applicable for orders in
Auction session.
Absence of this field is interpreted as 0 = Day.
54
Side
Y
Side of the order



1 = Buy
2 = Sell
5 = Sell Short
38
OrderQty
N
Total order quantity of the order
44
Price
N
Price of order.
Required if:
OrdType (40) = 2 (Limit).
60
TransactTime
Y
The time at which the particular message was
generated.
528
OrderCapacity
N
Designates the capacity of the firm placing the
order:


529
OrderRestrictions
N
A = Agency
P = Principal
Restrictions associated with this order:



2 = Index Arbitrage
5 = Acting as Market Maker or Specialist in
Security
6 = Acting as Market Maker or Specialist in
underlying of a derivative security
The above 3 values are applicable only if Side (54) =
5 (Sell Short)
1090
MaxPriceLevels
N
Maximum number of price levels to trade through.
Applicable if:
OrdType (40) = 2 (Limit).
If present, this should be set as 1.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 30 of 55
77
PositionEffect
N
Indicates whether the resulting position after a
trade should be an opening position or closing
position:

1 = Close
Applicable only if:
Side (54) = 1 (Buy) to indicate covering a short
sell.
39
OrdStatus
Y
Order Status after applying the transaction that is
being communicated:

150
ExecType
Y
4 = Cancelled
Execution Type that indicates the reason for the
generation of the Execution Report:

4 = Cancelled
14
CumQty
Y
Cumulative execution size
151
LeavesQty
Y
Open order quantity
58
Text
N
Free Text
LotType
N
Lot Type of the order:
1093


1 = Odd Lot
2 = Round Lot
Absence of this field indicates a Round (i.e., Board)
Lot order.
378
ExecRestatementReason
N
Code to identify the reason for an Execution
Report message with Exec Type= 4 (Cancel):










797
CopyMsgIndicator
Y
6 = Cancel on Trading Halt
8 = Market Operation
100 = Unsolicited Cancel for original order (for
cancel/replace operation which fails market
validation)
101 = OBO Single Order Cancel
102 = OBO Mass Order Cancel
103 = Mass cancelled by Broker
104 = Cancel On Disconnect
105 = Cancel due to Broker suspension
106 = Cancel due to Exchange Participant
suspension
107 = System Cancel
Indicates whether or not this message is a drop
copy of another message.
Always set to Y.
Message Trailer
7.7.4
Order Expired
The OCG will send this execution report when an order expires.
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
8 = Execution Report
Message Body
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 31 of 55
11
ClOrdID
N
Client specified identifier of the order.
37
OrderID
Y
Order ID as assigned by the exchange.
17
ExecID
Y
Unique Execution ID assigned for each Execution
Report generated.
Component Block <Trading Party>
453

448
NoPartyIDs
Y
Number of party identifiers. The value in this field
can be 1 or 2.
PartyID
Y
ID of the Broker client submitting the order:
Broker ID/BS User ID.

447
PartyIdSource
Y
Defines the naming convention used in specifying
the PartyID (448):


452
PartyRole
Y
D = Proprietary/Custom Code
Role of the specified PartyID (448):


1 = Executing Firm (Broker ID that submitted
the order)
75 = Location ID (BS User ID)
End Component Block
Component Block <Instrument>
48
SecurityID
Y
Instrument identifier
22
SecurityIDSource
N
Identifies the source of the SecurityID (48):

8 = Exchange Symbol
Required if:
SecurityID (48) is specified
207
SecurityExchange
N
The market which is used to identify the security:

XHKG
Required if:
SecurityIDSource (22) = 8 (Exchange Symbol).
End Component Block
40
OrdType
N
Order type applicable to the order:


59
TimeInForce
N
1 = Market
2 = Limit
Time qualifier of the order:




0 = Day (Default)
3 = Immediate or Cancel = IOC
4 = Fill or Kill = FOK
9 = At Crossing. Applicable for orders in
Auction session.
Absence of this field is interpreted as 0 = Day.
54
Side
Y
Side of the order



1 = Buy
2 = Sell
5 = Sell Short
38
OrderQty
N
Total order quantity of the order
44
Price
N
Price of order.
Required if:
OrdType (40) = 2 (Limit).
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 32 of 55
60
TransactTime
Y
The time at which the particular message was
generated.
528
OrderCapacity
N
Designates the capacity of the firm placing the
order:


529
OrderRestrictions
N
A = Agency
P = Principal
Restrictions associated with this order:



2 = Index Arbitrage
5 = Acting as Market Maker or Specialist in
Security
6 = Acting as Market Maker or Specialist in
underlying of a derivative security
The above 3 values are applicable only if Side (54) =
5 (Sell Short)
1090
MaxPriceLevels
N
Maximum number of price levels to trade through.
Applicable if:
OrdType (40) = 2 (Limit).
If present, this should be set as 1.
77
PositionEffect
N
Indicates whether the resulting position after a
trade should be an opening position or closing
position:

1 = Close
Applicable only if:
Side (54) = 1 (Buy) to indicate covering a short
sell.
39
OrdStatus
Y
Order Status after applying the transaction that is
being communicated:

150
ExecType
Y
C = Expired
Execution Type that indicates the reason for the
generation of the Execution Report:

C = Expired
14
CumQty
Y
Cumulative execution size
151
LeavesQty
Y
Open order quantity
58
Text
N
Free Text
LotType
N
Lot Type of the order:
1093


1 = Odd Lot
2 = Round Lot
Absence of this field indicates a Round (i.e., Board)
Lot order.
797
CopyMsgIndicator
Y
Indicates whether or not this message is a drop
copy of another message.
Always set to Y.
Message Trailer
7.7.5
Order Replaced
The OCG sends this execution report when a Cancel/Replace request is accepted. This
message is not applicable to an odd lot order.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 33 of 55
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
8 = Execution Report
Message Body
11
ClOrdID
N
Client specified identifier of the order cancel
request.
41
OrigClOrdID
N
Original client specified identifier for the incoming
cancel request
37
OrderID
Y
Order ID as assigned by the exchange.
17
ExecID
Y
Unique Execution ID assigned for each Execution
Report generated.
Component Block <Trading Party>
453

448
NoPartyIDs
Y
Number of party identifiers. The value in this field
can be 1 or 2.
PartyID
Y
ID of the Broker client submitting the order:
Broker ID/BS User ID.

447
PartyIdSource
Y
Defines the naming convention used in specifying
the PartyID (448):


452
PartyRole
Y
D = Proprietary/Custom Code
Role of the specified PartyID (448):


1 = Executing Firm (Broker ID that submitted
the order)
75 = Location ID (BS User ID)
End Component Block
Component Block <Instrument>
48
SecurityID
Y
Instrument identifier
22
SecurityIDSource
N
Identifies the source of the SecurityID (48):

8 = Exchange Symbol
Required if:
SecurityID (48) is specified
207
SecurityExchange
N
The market which is used to identify the security:

XHKG
Required if:
SecurityIDSource (22) = 8 (Exchange Symbol).
End Component Block
40
OrdType
N
Order type applicable to the order:


59
TimeInForce
N
1 = Market
2 = Limit
Time qualifier of the order:




0 = Day (Default)
3 = Immediate or Cancel = IOC
4 = Fill or Kill = FOK
9 = At Crossing. Applicable for orders in
Auction session.
Absence of this field is interpreted as 0 = Day.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 34 of 55
54
Side
Y
Side of the order



1 = Buy
2 = Sell
5 = Sell Short
38
OrderQty
N
Total order quantity of the order
44
Price
N
Price of order.
Required if:
OrdType (40) = 2 (Limit).
60
TransactTime
Y
The time at which the particular message was
generated.
528
OrderCapacity
N
Designates the capacity of the firm placing the
order:


529
OrderRestrictions
N
A = Agency
P = Principal
Restrictions associated with this order:



2 = Index Arbitrage
5 = Acting as Market Maker or Specialist in
Security
6 = Acting as Market Maker or Specialist in
underlying of a derivative security
The above 3 values are applicable only if Side (54) =
5 (Sell Short)
1090
MaxPriceLevels
N
Maximum number of price levels to trade through.
Applicable if:
OrdType (40) = 2 (Limit).
If present, this should be set as 1.
77
PositionEffect
N
Indicates whether the resulting position after a
trade should be an opening position or closing
position:

1 = Close
Applicable only if:
Side (54) = 1 (Buy) to indicate covering a short
sell.
39
OrdStatus
Y
Order Status after applying the transaction that is
being communicated:


150
ExecType
Y
0 = New
1 = Partially Filled
Execution Type that indicates the reason for the
generation of the Execution Report:

5 = Replaced
14
CumQty
Y
Cumulative execution size
151
LeavesQty
Y
Open order quantity
58
Text
N
Free Text
LotType
N
Lot Type of the order:
1093

2 = Round Lot
Absence of this field indicates a Round (i.e., Board)
Lot order.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 35 of 55
797
CopyMsgIndicator
Y
Indicates whether or not this message is a drop
copy of another message.
Always set to Y.
Message Trailer
Note: For an Order Cancel/Replace Request (i.e., Order Amend Request) submitted through interfaces other than
the OCG, to modify order price and/or increase order quantity, the Drop Copy interface will provide an Execution
Report = Order Cancelled first (for the original order) followed by, if applicable, Execution Report = Order Accepted
(for the replaced order).
7.7.6
Trade (Board Lot / Odd Lot Order Executed)
The OCG sends this execution report for a trade.
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
8 = Execution Report
Message Body
11
ClOrdID
N
Client specified identifier of the order.
37
OrderID
Y
Order ID as assigned by the exchange.
17
ExecID
Y
Unique Execution ID assigned for each Execution
Report generated.
Component Block <Trading Party>
453

448
NoPartyIDs
Y
Number of party identifiers. The value in this field
can be 1 or 2.
PartyID
Y
ID of the Broker client submitting the order:
Broker ID/BS User ID.

447
PartyIdSource
Y
Defines the naming convention used in specifying
the PartyID (448):


452
PartyRole
Y
D = Proprietary/Custom Code
Role of the specified PartyID (448):


1 = Executing Firm (Broker ID that submitted
the order)
75 = Location ID (BS User ID)
End Component Block
Component Block <Instrument>
48
SecurityID
Y
Instrument identifier
22
SecurityIDSource
N
Identifies the source of the SecurityID (48):

8 = Exchange Symbol
Required if:
SecurityID (48) is specified
207
SecurityExchange
N
The market which is used to identify the security:

XHKG
Required if:
SecurityIDSource (22) = 8 (Exchange Symbol).
End Component Block
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 36 of 55
40
OrdType
N
Order type applicable to the order:


59
TimeInForce
N
1 = Market
2 = Limit
Time qualifier of the order:




0 = Day (Default)
3 = Immediate or Cancel = IOC
4 = Fill or Kill = FOK
9 = At Crossing. Applicable for orders in
Auction session.
Absence of this field is interpreted as 0 = Day.
54
Side
Y
Side of the order



1 = Buy
2 = Sell
5 = Sell Short
38
OrderQty
N
Total order quantity of the order
44
Price
N
Price of order.
Required if:
OrdType (40) = 2 (Limit).
60
TransactTime
Y
The time at which the particular message was
generated.
528
OrderCapacity
N
Designates the capacity of the firm placing the
order:


529
OrderRestrictions
N
A = Agency
P = Principal
Restrictions associated with this order:



2 = Index Arbitrage
5 = Acting as Market Maker or Specialist in
Security
6 = Acting as Market Maker or Specialist in
underlying of a derivative security
The above 3 values are applicable only if Side (54) =
5 (Sell Short)
1090
MaxPriceLevels
N
Maximum number of price levels to trade through.
Applicable if:
OrdType (40) = 2 (Limit).
If present, this should be set as 1.
77
PositionEffect
N
Indicates whether the resulting position after a
trade should be an opening position or closing
position:

1 = Close
Applicable only if:
Side (54) = 1 (Buy) to indicate covering a short
sell.
39
OrdStatus
Y
Order Status after applying the transaction that is
being communicated:


150
ExecType
Y
Execution Type that indicates the reason for the
generation of the Execution Report:

© Copyright of Hong Kong Exchanges and Clearing Limited
1 = Partially Filled
2 = Filled
F = Trade
Page 37 of 55
31
LastPx
Y
Execution Price
32
LastQty
Y
Execution Size
14
CumQty
Y
Cumulative execution size
151
LeavesQty
Y
Open order quantity
574
MatchType
N
The point in the matching process at which the
trade was matched:


1115
OrderCategory
N
4 = Auto match
5 = Cross Auction
Defines the type of interest behind a trade

A = Internal Cross Order
Absence of this field means the trade is not
concluded within the same firm
58
1093
Text
N
Free Text
LotType
N
Lot Type of the order:


1 = Odd Lot
2 = Round Lot
Absence of this field indicates a Round (i.e., Board)
Lot order
797
CopyMsgIndicator
Y
Indicates whether or not this message is a drop
copy of another message.
Always set to Y.
Message Trailer
7.7.7
Board Lot/Odd Lot Trade Cancelled
The OCG sends this execution report when a trade executed through board lot or odd lot
orders is cancelled by the exchange.
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
8 = Execution Report
Message Body
11
ClOrdID
N
Client specified identifier of the order.
37
OrderID
Y
Order ID as assigned by the exchange.
17
ExecID
Y
Unique Execution ID assigned for each Execution
Report generated.
19
ExecRefID
N
Execution Reference identifier used with Trade
Cancel; refers to the Exec ID of the original trade.
Component Block <Trading Party>
453

448
NoPartyIDs
Y
Number of party identifiers. The value in this field
can be 1 or 2.
PartyID
Y
ID of the Broker client submitting the order:
Broker ID/BS User ID.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 38 of 55

447
PartyIdSource
Y
Defines the naming convention used in specifying
the PartyID (448):


452
PartyRole
Y
D = Proprietary/Custom Code
Role of the specified PartyID (448):


1 = Executing Firm (Broker ID that submitted
the order)
75 = Location ID (BS User ID)
End Component Block
Component Block <Instrument>
48
SecurityID
Y
Instrument identifier
22
SecurityIDSource
N
Identifies the source of the SecurityID (48):

8 = Exchange Symbol
Required if:
SecurityID (48) is specified
207
SecurityExchange
N
The market which is used to identify the security:

XHKG
Required if:
SecurityIDSource (22) = 8 (Exchange Symbol).
End Component Block
40
OrdType
N
Order type applicable to the order:


59
TimeInForce
N
1 = Market
2 = Limit
Time qualifier of the order:




0 = Day (Default)
3 = Immediate or Cancel = IOC
4 = Fill or Kill = FOK
9 = At Crossing. Applicable for orders in
Auction session.
Absence of this field is interpreted as 0 = Day.
54
Side
Y
Side of the order



1 = Buy
2 = Sell
5 = Sell Short
38
OrderQty
N
Total order quantity of the order
44
Price
N
Price of order.
Required if:
OrdType (40) = 2 (Limit).
60
TransactTime
Y
The time at which the particular message was
generated.
528
OrderCapacity
N
Designates the capacity of the firm placing the
order:


© Copyright of Hong Kong Exchanges and Clearing Limited
A = Agency
P = Principal
Page 39 of 55
529
OrderRestrictions
N
Restrictions associated with this order:



2 = Index Arbitrage
5 = Acting as Market Maker or Specialist in
Security
6 = Acting as Market Maker or Specialist in
underlying of a derivative security
The above 3 values are applicable only if Side (54) =
5 (Sell Short)
1090
MaxPriceLevels
N
Maximum number of price levels to trade through.
Applicable if:
OrdType (40) = 2 (Limit).
If present, this should be set as 1.
77
PositionEffect
N
Indicates whether the resulting position after a
trade should be an opening position or closing
position:

1 = Close
Applicable only if:
Side (54) = 1 (Buy) to indicate covering a short
sell.
39
OrdStatus
Y
Order Status after applying the transaction that is
being communicated:




150
ExecType
Y
1 = Partially Filled
2 = Filled
4 = Cancelled
C = Expired
Execution Type that indicates the reason for the
generation of the Execution Report:

H = Trade Cancel
31
LastPx
N
Execution Price
32
LastQty
N
Execution Size
14
CumQty
Y
Cumulative execution size
151
LeavesQty
Y
Open order quantity
1115
OrderCategory
N
Defines the type of interest behind a trade

A = Internal Cross Order
Absence of this field means the trade is not
concluded within the same firm
58
1093
Text
N
Free Text
LotType
N
Lot Type of the order:


1 = Odd Lot
2 = Round Lot
Absence of this field indicates a Round (i.e., Board)
Lot order.
378
ExecRestatementReason
N
Code to identify the reason for an Execution
Report message with Exec Type= H (Trade Cancel):

797
CopyMsgIndicator
Y
8 = Market (exchange) option
Indicates whether or not this message is a drop
copy of another message.
Always set to Y.
Message Trailer
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 40 of 55
7.8
Business Messages – Trade Reporting (AE)
7.8.1
Trade Accepted
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
AE = Trade Capture Report
571
TradeReportID
N
Unique Identification for the Trade Capture
Report assigned by the reporting side of the
Trade (to be returned to the reporting broker)
1003
TradeID
Y
Unique identifier as assigned to the trade by
the exchange.
487
TradeReportTransType
N
Identifies the trade report message
transaction type:
Message Body


856
TradeReportType
Y
Type of the Trade Report:

1123
TradeHandlingInstr
N
TrdType
Y
ExecType
N
TrdRptStatus
N
4 = Late Trade
22 = Privately Negotiated Trade
102 = Odd Lot Trade
104 = Overseas Trade
Execution type:

939
0 = Trade Confirm
Type of the trade being reported:




150
0 = Submit
Indicates how the trade capture report should
be handled by the receiver:

828
0 = New (for the non-reporting side)
2 = Replace (for the reporting side)
F = Trade
Trade Report Status:

0 = Accepted
31
LastPx
Y
Execution Price
32
LastQty
Y
Execution Size
60
TransactTime
Y
The time at which the particular message was
generated.
Y
Number of sides:
Component Block <TrdCapRptSideGrp>
552
NoSides



54
Side
Y
Side of the trade





1 = Overseas or internalized
2 = Default
1 = Buy
2 = Sell
5 = Sell Short
Component Block <Trading Party>
453
NoPartyIDs
© Copyright of Hong Kong Exchanges and Clearing Limited
Y
Number of party identifiers. The value in this
field should be 1 or 2 or 3.
Page 41 of 55


448
PartyID
Y
Broker ID/Counterparty Broker ID/BS User ID.


447
PartyIdSource
Y
Defines the naming convention used in
specifying the PartyID (448):



452
PartyRole
Y
D = Proprietary/Custom Code
Role of the specified PartyID (448):



1 = Executing Firm (Broker ID that is
receiving this trade)
17 = Contra Firm (Counterparty Broker
ID)
75 = Location ID (BS User ID)
For any TrdType, there will be one Broker ID
with PartyRole = 1.
Counterparty Broker ID (PartyRole=17) is not
applicable if:
TradeHandlingInstr (1123) is 6 (One
party report)
Location ID (PartyRole = 75) is with relation to
the Broker ID that reported this trade.

End Component Block

Component Block <ClrInstGrp>

576
NoClearingInstructions
N
Number of clearing instructions.
Always set to 1.


577
ClearingInstruction
N
Eligibility of this trade for clearing and central
counterparty processing:




End Component Block

Component Block <TradeReportOrderDetail>

528
OrderCapacity
N
Designates the capacity of the firm placing
the order:




0 = Process normally
1 = Exclude from all netting
14 = Buy-In
A = Agency
P = Principal
End Component Block
77
PositionEffect
N
Indicates whether the resulting position after
a trade should be an opening position or
closing position:

1 = Close
Applicable only if:


58

1115
Side (54) = 1 (Buy) to indicate covering a
short sell.
Text
N
Free Text
OrderCategory
N
Defines the type of interest behind a trade

A = Internal Cross Order
Absence of this field means the trade is not
concluded within the same firm
End Component Block
Component Block <Instrument>
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 42 of 55
48
SecurityID
Y
Instrument identifier
22
SecurityIDSource
N
Identifies the source of the SecurityID (48):

8 = Exchange Symbol
Required if:
SecurityID (48) is specified
207
SecurityExchange
N
The market which is used to identify the
security:

XHKG
Required if:
SecurityIDSource (22) = 8 (Exchange
Symbol).
End Component Block
5681
ExchangeTradeType
N
Exchange assigned Trade Type:






797
CopyMsgIndicator
Y
M = Manual Trade
S = Manual – Non Standard Price Trade
Q = Special Lot Trade
P = Odd Lot Trade
R = Previous Day’s Trade
V = Overseas Trade
Indicates whether or not this message is a
drop copy of another message.
Always set to Y.
Message Trailer
7.8.2
Trade Cancelled
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
AE = Trade Capture Report
571
TradeReportID
N
Unique Identification for the Trade Capture
Report assigned by the reporting side of the
Trade (to be returned to the reporting broker)
1003
TradeID
Y
Unique identifier as assigned to the trade by
the exchange.
487
TradeReportTransType
N
Identifies the trade report message
transaction type:
Message Body



856
TradeReportType
Y
Type of the Trade Report:

© Copyright of Hong Kong Exchanges and Clearing Limited
0 = New (for the party opposite to that
requesting this cancel)
2 = Replace (for the party requesting
this cancel)
5 = Cancel due to back out of trade (for
both buyer and seller if ExecType = L)
6 = Trade Report Cancel
Page 43 of 55
1123
TradeHandlingInstr
N
Indicates how the trade capture report should
be handled by the receiver:

150
ExecType
N
0 = Trade Confirm
Execution Type that indicates the reason for
the generation of this confirmation:


H = Trade Cancel (by the counter-party)
L = Triggered or activated by System
(cancelled by the exchange)
31
LastPx
Y
Execution Price
32
LastQty
Y
Execution Size
60
TransactTime
Y
The time at which the particular message was
generated.
Y
Number of sides:
Component Block <TrdCapRptSideGrp>
552
NoSides


54
Side
Y
Side of the trade




1
1 = Buy
2 = Sell
5 = Sell Short
Component Block <Trading Party>

453
NoPartyIDs
Y
Number of party identifiers. The value in this
field should be 1 or 2.


448
PartyID
Y
Broker ID for this side of the trade/BS User ID.


447
PartyIdSource
Y
Defines the naming convention used in
specifying the PartyID (448):



452
PartyRole
Y
Role of the specified PartyID (448):



D = Proprietary/Custom Code
1 = Executing Firm (Broker ID that is
receiving this trade message)
75 = Location ID (BS User ID)
End Component Block
End Component Block
Component Block <Instrument>
48
SecurityID
Y
Instrument identifier
22
SecurityIDSource
N
Identifies the source of the SecurityID (48):

8 = Exchange Symbol
Required if:
SecurityID (48) is specified
207
SecurityExchange
N
The market which is used to identify the
security:

XHKG
Required if:
SecurityIDSource (22) = 8 (Exchange
Symbol).
End Component Block
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 44 of 55
797
CopyMsgIndicator
Y
Indicates whether or not this message is a
drop copy of another message.
Always set to Y.
Message Trailer
7.9
Infrastructure
7.9.1
Business Message Reject (j)
This message can be initiated by the OCG.
FIX Tag
Field Name
Required?
Description
Message Header
35
MsgType
Y
j= Business Message Reject
Message Body
45
RefSeqNum
N
Sequence number of the message which caused
the rejection
372
RefMsgType
Y
Message type of the rejected message.
379
BusinessRejectRefID
N
The value of the business-level "ID" field on the
message being referenced.
380
BusinessRejectReason
Y
Code specifying the reason for the rejection of the
message:






58
Text
N
0 = Other
1 = Unknown ID
2 = Unknown Security
3 = Unspecified Message Type
4 = Application not available
5 = Conditionally required field missing
Where possible, message to explain reason for
rejection
Message Trailer
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 45 of 55
8.
Data Dictionary
8.1
Session Level
Tag
Field Name
Data Type
Description
7
BeginSeqNo
SeqNum
Sequence number of first message in
range.
8
BeginString
String
Identifies beginning of new message
and protocol version
Valid values: FIXT.1.1
9
BodyLength
Length
Number of characters after this field
up to and including the delimiter
immediately preceding the CheckSum.
10
CheckSum
String
Three byte, simple checksum. Always
the last field in message
16
EndSeqNo
SeqNum
Sequence number of last message in
range
34
MsgSeqNum
SeqNum
Sequence number of the message.
35
MsgType
36
NewSeqNo
SeqNum
Sequence number of the next message
to be transmitted.
43
PossDupFlag
Boolean
Whether the message was previously
transmitted under the same
MsgSeqNum (34).
String










0 = Heartbeat
1 =Test Request
2 = Resend Request
3 = Reject
4 = Sequence Reset
5 = Logout
8 = Execution Report
j = Business Message Reject
A = Logon
AE = Trade Capture Report
Absence of this field is interpreted as
Original Transmission (N).
45
RefSeqNum
49
SenderCompID
52
SendingTime
56
TargetCompID
© Copyright of Hong Kong Exchanges and Clearing Limited
SeqNum
Sequence number of the rejected
message.
String
Comp ID of the party sending the
message.
UTC Time
Stamp
Time the message was transmitted.
String
Comp ID of the party the message is
sent to
Page 46 of 55
97
PossResend
Boolean
Whether the message was previously
transmitted under a different
MsgSeqNum (34).
Absence of this field is interpreted as
Original Transmission (N).
98
EncryptMethod
Int
Method of encryption
108
HeartBtInt
Int
Indicates the heartbeat interval in
seconds.
112
TestReqID
String
Required if the heartbeat is a response
to a Test Request. The value in this
field should echo the TestReqID (112)
received in the Test Request.
Identifier for the request
122
OrigSendingTime
UTC Time
Stamp
Time the message was originally
transmitted.
If the original time is not available, this
should be the same value as
SendingTime (52).
Required if
PossDupFlag (43) is Possible
Duplicate (Y).
123
GapFillFlag
Boolean
Mode in which the message is being
used.
Absence of this field is interpreted as
Sequence Reset (N).
371
RefTagID
372
RefMsgType
© Copyright of Hong Kong Exchanges and Clearing Limited
Int
If a message is rejected due to an issue
with a particular field its tag number
will be indicated.
String
Message type of the rejected message.
Page 47 of 55
373
SessionRejectReason
Int
Code specifying the reason for the
reject:



0 = Invalid Tag Number
1 = Required Tag Missing
2 = Tag not defined for this
message
3 = Undefined tag
4 = Tag specified without a value
5 = Value is incorrect (out of
range) for this tag
6 = Incorrect data format for value
9 = CompID problem
10 = Sending Time Accuracy
problem
11 = Invalid Msg Type
13 = Tag appears more than once
15 = Repeating group fields out of
order
16 = Incorrect NumInGroup count
for repeating group
18 = Invalid/Unsupported
Application Version












380
BusinessRejectReason
Int
99 = Other
Code specifying the reason for the
rejection of the business message






464
TestMessageIndicator
Boolean
0 = Other
1= Unknown ID
2 = Unknown Security
3= Unspecified Message Type
4= Application not available
5 = Conditionally required field
missing
Used to specify that this FIX session
will be sending and receiving "test" vs.
"production" messages
Only applicable for Logon (35=A)
message from the OCG to the client
554
Password
String
789
NextExpectedMsgSeqNum
925
NewPassword
String
New password for the Comp ID.
1128
ApplVerID
String
Version of FIX used in the message.
SeqNum
Password assigned to the Comp ID.
Required if the message is generated
by the client.
Next expected MsgSeqNum value to be
received
Required if the message is generated
by the OCG.
1137
DefaultApplVerID
© Copyright of Hong Kong Exchanges and Clearing Limited
String
Default version of FIX messages used in
this session.
Page 48 of 55
1400
EncryptedPasswordMethod
Int
Enumeration defining the encryption
method used to encrypt password
fields:

1401
EncryptedPasswordLen
1402
EncryptedPassword
1403
EncryptedNewPasswordLen
1404
EncryptedNewPassword
1409
SessionStatus
Length
Data
Length of the EncryptedPassword
(1402) field
Encrypted password – encrypted via
the method specified in
EncryptedPasswordMethod (1400)
Length
Length of the EncryptedNewPassword
(1404) field
Data
Encrypted new password – encrypted
via the method specified in
EncryptedPasswordMethod (1400)
Int
Status of the FIX session. Required if
the message is generated by the
server.









8.2
101 = RSA
0 = Session active
1 = Session password changed
2 = Session password due to
expire
3 = New session password does
not comply with policy
5 = Invalid username or password
6 = Account locked
7 = Logons are not allowed at this
time
8 = Password expired
100 = Password change is required
Business Level
Tag
Field Name
Data Type
Description
11
ClOrdID
String
14
CumQty
Qty
17
ExecID
String
Unique Execution ID assigned by the
system for each Execution Report
generated
19
ExecRefID
String
Reference identifier used with Trade
and Trade Cancel execution types
22
SecurityIDSource
String
Identifier of the source of the
SecurityID (48) value.
31
LastPx
Price
Price of this fill. Execution price
32
LastQty
Qty
Quantity executed in this fill.
Execution size
© Copyright of Hong Kong Exchanges and Clearing Limited
Unique identifier of the order as
assigned by the client
Total quantity filled
Page 49 of 55
37
OrderID
String
Unique identifier for Order as
assigned by the server
38
OrderQty
Qty
Total order quantity.
39
OrdStatus
Char
Current status of the order:






40
OrdType
Char
0 = New
1 = Partially filled
2 = Filled
4 = Cancelled
8 = Rejected
C = Expired
Type of the order:


1 = Market
2 = Limit
41
OrigClOrdID
String
ClOrdID (11) of the previous order
(NOT the initial order of the day) as
assigned by the client, used to
identify the previous order in cancel
and cancel/replace requests
44
Price
Price
Limit price of the order
48
SecurityID
String
Identifier of the instrument.
54
Side
Char
Side of the order:



1 = Buy
2 = Sell
5 = Sell short
58
Text
String
Free format text string
59
TimeInForce
Char
Specifies how long the order remains
in effect:





60
TransactTime
UTC Time
Stamp
77
PositionEffect
Char
Time qualifier of the order
Indicates whether the resulting
position after a trade should be an
opening position or closing position:

150
ExecType
Char
C = Close
Describes the specific Execution
report







© Copyright of Hong Kong Exchanges and Clearing Limited
Absent = Day
0 =Day
3 = IOC
4 = FOK
9 = At Crossing
0 = New
C = Expired
F = Trade
H = Trade Cancel
4 = Cancelled
5 = Replaced
L – Triggered or activated by
system
Page 50 of 55
151
LeavesQty
207
SecurityExchange
Qty
Exchange
Quantity open for further execution
Market used to help identify a
security.
Valid values
378
ExecRestatementReason
Int
Code to identify reason for an
Execution Report message sent when
communicating an unsolicited cancel:










6 = Cancel on Trading Halt
8 = Market (Exchange) Option
100 = Unsolicited Cancel
101 = On Behalf Of Single Cancel
102 = On Behalf Of Mass Cancel
103 = Mass Cancelled by the
Broker
104 = Cancel on Disconnect
105 = Cancel due to Broker
suspension
106 = Cancel due to Exchange
Participant suspension
107 = System Cancel
447
PartyIDSource
Char
Identifies class or source of the
PartyID (448) value.
448
PartyID
String
Party identifier/code
452
Party Role
Int
453
NoPartyIDs
NumInGroup
487
TradeReportTransType
Int
Identifies the type or role of the
PartyID (448) specified
Number of PartyID
Identifies Trade Report message
transaction type:



528
OrderCapacity
Char
Designates the capacity of the firm
placing the order:


529
OrderRestrictions
MultipleChar
0 = New
2 = Replace
5 = Cancel due to back out of
trade.
1 = Agency
2 = Principal
Restrictions associated with an order:



2 = Index Arbitrage
5 = Acting As Market Maker Or
Specialist In Security
6 = Acting As Market Maker Or
Specialist In Underlying of a
derivative security
The above 3 values are applicable
only if Side = 5 (Sell Short)
552
NoSides
571
TradeReportID
© Copyright of Hong Kong Exchanges and Clearing Limited
NumINGroup
String
Number of Side repeating group
instances
Unique identifier of trade capture
report
Page 51 of 55
574
MatchType
String
The point in the matching process at
which this trade was matched:


576
NoClearingInstructions
577
ClearingInstruction
NumINGroup
Int
Number of clearing instructions
Clearing Information:



797
CopyMsgIndicator
828
TrdType
Boolean
Int
TradeReportType
Int
Type of the trade being reported:
TrdRptStatus
Int
4 = Late Trade
22 = Privately Negotiated Trade
102 = Odd Lot Trade
104 = Overseas Trade
Type of the Trade Report:


939
0 = Process normally
1 = Exclude from all netting
14 = Buy In
Indicates whether or not the message
is a drop copy of another message.




856
4 = Auto Match
5 = Cross Auction
0 = New
6 = Trade Report Cancel
Trade Report Status:


0 = Accepted
1 = Rejected
Absence of this field indicates 0 =
Accepted
1003
TradeID
1090
MaxPriceLevels
1093
LotType
String
Int
Char
The unique ID assigned to the trade
entity once it is received or matched
by the server
Allows an order to specify a maximum
number of price levels to trade
through
Lot Type of the order:


1 = Odd Lot
2 = Round Lot
Absence of this field indicates a
Round (i.e., Board) Lot order.
1115
OrderCategory
Char
Defines the type of interest behind a
trade:

1123
TradeHandlingInstr
Char
Indicates how the trade capture
report should be handled by the
receiver:



© Copyright of Hong Kong Exchanges and Clearing Limited
A = Internal Cross Order
0 = Trade Confirm
1 = Two Party Report
6 = One Party Report
Page 52 of 55
5681
ExchangeTradeType
Char
Exchange assigned trade type for a
reported trade:






© Copyright of Hong Kong Exchanges and Clearing Limited
M = Manual Trade
S = Manual Non Standard price
Q = Special Lot
P = Odd Lot
R = Previous Day
V = Overseas
Page 53 of 55
Appendices
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 54 of 55
A.
Password Policy

Length is 8 characters.

Must comprise of a mix of alphabets (A-Z/a-z) and digits (0-9)

Must be changed on first-time logon or first logon after reset from HKEx market
operations.

New password can’t be one of the previous 5 passwords.

Can’t be changed more than once per day.

Session will be locked after 3 consecutive invalid passwords

Expires every 90 days.
© Copyright of Hong Kong Exchanges and Clearing Limited
Page 55 of 55
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising