FIX
DLTF operates FIX Trading Gateways which allow users to manage orders on their DLTF Account using FIX 4.4 messages.
Connection validation
In order to activate the fix protocol, you need to provide us with the public key of your certificate, which you will use every time you connect to the FIX server. Example of certificate generation:
$ openssl genrsa -out example.key 2048
$ openssl req -new -x509 -sha256 -key example.key -out example.crt -days 3650
In result you will have 2 files: example.key and example.crt. example.key
must be used for encrypt TLS connection to FIX server. example.crt
must be provided to DLTF for connection validation.
Environments
DLTF operates both Production and Test environments which can be connected to using FIX using the following connection parameters.
DLTF Digital Service | IP/DNS | Port | DLTF CompId | Client CompId | Client SubId |
---|---|---|---|---|---|
Test | fix.stage.dltm.quanttradingfactory.com | 5002 | STAGE_DLTF_MD | <check details in client FIX settings> | <check details in client FIX settings> |
Messages sizes
Inbound message size limit
The DLTF FIX Trading Gateways have a maximum inbound message limit of 8192
bytes. If a message is received which exceeds this size, the client will be logged off.
Outbound message size
The DLTF FIX Trading Gateway will never publish messages greater than 8192
bytes.
Recovery
The DLTF FIX Market Data Gateways do not support any FIX message recovery.
In the event of the DLTF FIX Market Data Gateway requesting a message re-send, the resent messages will be ignored.
Sequence number on logon
Client must login with the tag 141 (ResetSeqNumFlag) set to 'Y' always.
Compatibility
DLTF aims to maximise compatibility by using standard FIX messages, tags and usage conventions wherever possible.
Periodically, DLTF updates it's FIX specifications in response to changes to the core trading application. Usually these changes are to support additional features and wherever possible this will be achieved through the use of additional messages, tags in existing messages or tag values in existing tags. In order to minimise the impact of these sort of changes, DLTF recommends that the client application accepts messages with unrecognised tags and ignores those tags which it cannot interpret.
DLTF will all endeavor to contact clients prior to change to the FIX API, particularly in the case where a change is breaking (i.e. not additive in nature).
Messages Supported Messages
DLTF supports the following FIX message types.
Type | Name | Description |
---|---|---|
0 | Heartbeat | Message sent during quite intervals on the connection to ensure that connection is still alive. |
1 | TestRequest | Message used to request a HeartBeat from the counterparty to allow round trip testing of the connection. |
2 | ResendRequest | Message used to request a replay of messages from the counter party. |
3 | Reject | Sent in response to a message which is structurally invalid (i.e. invalid or missing tag or ill-formed tag-value). |
4 | SequenceReset | SequenceReset. |
5 | Logout | Message used to terminate a FIX connection. Can be sent by the client or the DLTF FIX Gateway. |
A | Logon | Message used to establish a connection between a client and the DLTF FIX Gateway. |
V | MarketDataRequest | Message sent by the client to request market data. |
W | MarketDataSnapshotFullRefresh | Message sent by DLTF containing changes in market data |
Y | MarketDataRequestReject | Message sent in response to an invalid Market Data Request. |
xt | TraceSubscription |
Standard Message Components
StandardHeader
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
8 | BeginString | The FIX version number identifier. Always 'FIX.4.4' | Y | String |
9 | BodyLength | Length of the FIX Message. | Y | Length |
35 | MsgType | The type of the message. | Y | String |
49 | SenderCompID | Identifier for the sender of the message. | Y | String |
50 | SenderSubID | Sub identifier for the sender of the message. | Y | String |
56 | TargetCompID | Identifier for the receiver of the message. | Y | String |
34 | MsgSeqNum | The unique sequence number for the message within current FIX session. | Y | SeqNum |
43 | PossDupFlag | Always required for retransmitted messages, whether prompted by the sending system or as the result of a resend request. Set to 'Y' if this is a resent message. | N | Boolean |
97 | PossResend | Never used by DLTF. | N | Boolean |
52 | SendingTime | Time message was sent. | Y | UTCTimestamp |
122 | OrigSendingTime | Timestamp when message was originally sent. Required for message resent as a result of a ResendRequest. | N | UTCTimestamp |
StandardTrailer
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
10 | CheckSum | Checksum for message contents. | Y | String |
Instrument
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
48 | SecurityID | Must contain the DLTF orderbook id. | Y | String |
22 | SecurityIDSource | Must contain the value '8' (Exchange Symbol) | Y | String |
InstrmtMDReqGrp
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
146 | NoRelatedSym | Specifies the number of repeating symbols specified. | Y | NumInGroup |
Instrument | Y |
MDReqGrp
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
267 | NoMDEntryTypes | Number of MDEntryType (269) fields requested. | Y | NumInGroup |
269 | MDEntryType | Type Market Data entry. DLTF supported values: 0 = Bid 1 = Offer DLTF only allows subscription to both bid and ask at the same time. If only 0 or 1 is specified individually for a Market Data Request, then the request will be rejected. | Y | char |
MDFullGrp
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
268 | NoMDEntries | Number of entries in Market Data message. | Y | NumInGroup |
269 | MDEntryType | Type Market Data entry.DLTF supported values: 0 = Bid 1 = Offer | Y | char |
270 | MDEntryPx | Price of the Market Data Entry. | N | Price |
271 | MDEntrySize | Quantity or volume represented by the Market Data Entry. | N | Qty |
272 | MDEntryDate | Date of Market Data Entry. This tag will only be present on the first entry in the repeating group. | N | UTCDateOnly |
273 | MDEntryTime | Time of Market Data Entry. This tag will only be present on the first entry in the repeating group. | N | UTCTimeOnly |
Message Descriptions
Heartbeat
Message sent during quite intervals on the connection to ensure that connection is still alive.
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
StandardHeader | Y | MsgType= 0 | ||
112 | TestReqID | Required when the heartbeat is the result of a Test Request message. | N | String |
StandardTrailer | Y |
TestRequest
Message used to request a HeartBeat from the counterparty to allow round testing trip of the connection.
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
StandardHeader | Y | MsgType= 1 | ||
112 | TestReqID | Identifier included in Test Request message to be returned in resulting Heartbeat | Y | String |
StandardTrailer | Y |
ResendRequest
Message used to request a replay of messages from the counter party.
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
StandardHeader | Y | MsgType= 2 | ||
7 | BeginSeqNo | Message sequence number of first message in range to be resent | Y | SeqNum |
16 | EndSeqNo | Message sequence number of last message in range to be resent. If request is for a single message BeginSeqNo (7) = EndSeqNo. If request is for all messages subsequent to a particular message, EndSeqNo = “0” (representing infinity). | Y | SeqNum |
StandardTrailer | Y |
Reject
Sent in response to a message which is structurally invalid (i.e. invalid or missing tag or ill-formed tag-value).
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
StandardHeader | Y | MsgType= 3 | ||
45 | RefSeqNum | MsgSeqNum of rejected message | Y | SeqNum |
371 | RefTagID | The tag number of the FIX field being referenced. | N | int |
372 | RefMsgType | The MsgType of the FIX message being referenced. | N | String |
373 | SessionRejectReason | Code to identify reason for a session-level Reject message. | N | int |
58 | Text | Where possible, message to explain reason for rejection | N | String |
StandardTrailer | Y |
SequenceReset
SequenceReset
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
StandardHeader | Y | MsgType= 4 | ||
123 | GapFillFlag | Indicates that the Sequence Reset message is replacing administrative or application messages which will not be resent. Valid values: Y = Gap Fill message, MsgSeqNum field valid N = Sequence Reset, ignore MsgSeqNum | N | Boolean |
36 | NewSeqNo | New sequence number | Y | SeqNum |
StandardTrailer | Y |
Logout
Message used to terminate a FIX connection. Can be sent by the client or the DLTF FIX Gateway.
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
StandardHeader | Y | MsgType= 5 | ||
58 | Text | If DLTF logs out a client this may contain a text description for the reason for the logout. | N | String |
StandardTrailer | Y |
Logon
The Logon message must be the first message Client sends after establishing a TCP connection on the port agreed upon with DLTF. Client must wait for a Logon from DLTF before sending other messages and beginning gap fill operations.
Password is represented as ed25519 signature of [payload].
Payload is composed of the following fields:
MsgSeqNum SENDERCOMPID TARGETCOMPID API_KEY NONCE
The nonce is integer (recommend to use nanoseconds timestamp), always increasing value.
Example:
payload := fmt.Sprintf("%d%s%s%s%d", seqNum, sender, target, pubKeyHex, time.Now().UnixNano()) signatureRaw := ed25519.Sign(privateKey, []byte(payload)) signatureHex := hex.EncodeToString(signatureRaw)
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
StandardHeader | Y | MsgType= A | ||
98 | EncryptMethod | Always '0' - None | Y | int |
108 | HeartBtInt | The maximum time to wait before a Heartbeat message is sent in the absence of other activity on the connection. The same value is used by both parties. | Y | int |
141 | ResetSeqNumFlag | Indicates both sides of a FIX session should reset sequence numbers | N | Boolean |
553 | Username | API Token public key in HEX format. This is required on the login message sent by the client | Y | String |
554 | Password | Signature in HEX format. This is required on the login message sent by the client | Y | String |
5025 | Nonce | Time in ms since epoch as string. (This will be used in password generation and check) | Y | String |
StandardTrailer | Y |
MarketDataRequest
Message sent by the client to request market data. An individual request can be made for one or more instruments. Clients should rely on the SecurityID (tag 48) to identify the instrument each request is referencing.
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
StandardHeader | Y | MsgType= V | ||
262 | MDReqID | Must be unique, or the ID of previous Market Data Request to disable if SubscriptionRequestType = Disable previous Snapshot + Updates Request (2). | Y | String |
263 | SubscriptionRequestType | SubcriptionRequestType indicates to the other party what type of response is expected. DLTF supported values: 1 - Snapshot + Updates (Subscribe) 2 - Disable previous Snapshot + Updates Request (Unsubscribe) DLTF does not support 0 - Snapshot | Y | char |
264 | MarketDepth | Depth of market for Book Snapshot DLTF supported values: 0 = Full Depth (DLTF supports a maximum of 20 levels of depth) 1 = Top of Book 2-20 = Report best N price tiers of data, up to 20 levels. | Y | int |
265 | MDUpdateType | Required if SubscriptionRequestType = Snapshot + Updates (1).DLTF supported values 0 - Full Refresh. | N | int |
266 | AggregatedBook | Specifies whether or not book entries should be aggregated. Valid values: Y = one book entry per side per price N = Multiple entries per side per price allowed (Not specified) = broker option | N | Boolean |
MDReqGrp | Y | |||
InstrmtMDReqGrp | Y | |||
StandardTrailer | Y |
MarketDataSnapshotFullRefresh
Message received by the client showing the current order book. Clients should rely on the SecurityID (tag 48) to identify the instrument each update is referencing.
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
StandardHeader | Y | MsgType= W | ||
262 | MDReqID | Conditionally required if this message is in response to a Market Data Request. | N | String |
Instrument | Y | |||
MDFullGrp | Y | |||
StandardTrailer | Y |
MarketDataRequestReject
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
StandardHeader | Y | MsgType= Y | ||
262 | MDReqID | Must refer to the MDReqID of the request. | Y | String |
281 | MDReqRejReason | Reason for the rejection of a Market Data request.DLTF supported values: 0 = Unknown symbol 1 = Duplicate MDReqID 4 = Unsupported SubscriptionRequestType 5 = Unsupported MarketDepth 6 = Unsupported MDUpdateType 8 = Unsupported MDEntryType | N | char |
58 | Text | Free format text string (Note: this field does not have a specified maximum length) | N | String |
StandardTrailer | Y |
TraceSubscription
Tag | Tag Name | Description | Required | Data Type |
---|---|---|---|---|
StandardHeader | Y | MsgType= xt | ||
262 | MDReqID | Unique identifier for Market Data Request. MDReqId is restricted to a maximum of 16 lowercase hexadecimal characters [0123456789abcdef] with no leading 0 characters (this is a positive 64bit number represented in hexadecimal excluding 0). Must be unique for all current Market Data Requests. If a new Market Data Request (excluding unsubscribtion requests) is received with the same MDReqId as a current Market Data Request then the new request will be rejected as a duplicate. | Y | String |
263 | SubscriptionRequestType | Subscription Request Type Valid values: 0 = Snapshot; 1 = Snapshot + Updates (Subscribe); 2 = Disable previous Snapshot + Update Request (Unsubscribe); | Y | char |
StandardTrailer | Y |
Tags
Tag | Tag Name | Type | Description |
---|---|---|---|
1 | Account | String | Account mnemonic as agreed between buy and sell sides, e.g. broker and institution or investor/intermediary and fund manager. |
6 | AvgPx | Price | Not supported by DLTF - always 0 |
7 | BeginSeqNo | SeqNum | Message sequence number of first message in range to be resent |
8 | BeginString | String | Identifies beginning of new message and protocol version. ALWAYS FIRST FIELD IN MESSAGE. (Always unencrypted). Valid values: * FIX.4.4 |
9 | BodyLength | Length | Message length, in bytes, forward to the CheckSum field. ALWAYS SECOND FIELD IN MESSAGE. (Always unencrypted) |
10 | CheckSum | String | Three byte, simple checksum (see Volume 2: “Checksum Calculation” for description). ALWAYS LAST FIELD IN MESSAGE; i.e. serves, with the trailing <SOH> , as the end-of-message delimiter. Always defined as three characters. (Always unencrypted) |
16 | EndSeqNo | SeqNum | Message sequence number of last message in range to be resent. If request is for a single message BeginSeqNo (7) = EndSeqNo. If request is for all messages subsequent to a particular message, EndSeqNo = “0” (representing infinity). |
22 | SecurityIDSource | String | Identifies class or source of the SecurityID (48) value. Required if SecurityID is specified. DLTF Supported values are: 8 = Exchange Symbol |
34 | MsgSeqNum | SeqNum | Integer message sequence number. |
35 | MsgType | String | Defines message type ALWAYS THIRD FIELD IN MESSAGE. (Always unencrypted) Valid values: *** Note the use of lower case letters *** 0 = Heartbeat 1 = Test Request 2 = Resend Request 3 = Reject 4 = Sequence Reset 5 = Logout A = Logon V = Market Data Request W = Market Data-Snapshot/Full Refresh Y = Market Data Request Reject |
36 | NewSeqNo | SeqNum | New sequence number |
43 | PossDupFlag | Boolean | Indicates possible retransmission of message with this sequence number Valid values: Y = Possible duplicate N = Original transmission |
45 | RefSeqNum | SeqNum | Reference message sequence number |
48 | SecurityID | String | DLTF Security identifier. Requires SecurityIDSource=8. |
49 | SenderCompID | String | Assigned value used to identify firm sending message. |
50 | SenderSubID | String | Assigned value used to sub identify firm sending message. |
52 | SendingTime | UTCTimestamp | Time of message transmission (always expressed in UTC (Universal Time Coordinated, also known as “GMT”) |
56 | TargetCompID | String | Assigned value used to identify receiving firm. |
58 | Text | String | Free format text string (Note: this field does not have a specified maximum length) |
89 | Signature | data | Electronic signature |
93 | SignatureLength | Length | Number of bytes in signature field. |
95 | RawDataLength | Length | Number of bytes in raw data field. |
96 | RawData | data | Unformatted raw data, can include bitmaps, word processor documents, etc. |
97 | PossResend | Boolean | Indicates that message may contain information that has been sent under another sequence number.Valid Values: Y=Possible resend N=Original transmission DLTF will never populate this tag with any value other than 'N' on messages sent by DLTF. DLTF will ignore this tag on any messages received by DLTF and the treat the message as having been sent with PossResend='N'. |
98 | EncryptMethod | int | Method of encryption. Valid values: 0 = None / other DLTF does not support encryption at the FIX layer. All messages are sent over an SSL encrypted connection. Supported values: |
108 | HeartBtInt | int | Heartbeat interval (seconds) |
112 | TestReqID | String | Identifier included in Test Request message to be returned in resulting Heartbeat |
122 | OrigSendingTime | UTCTimestamp | Original time of message transmission (always expressed in UTC (Universal Time Coordinated, also known as “GMT”) when transmitting orders as the result of a resend request. |
123 | GapFillFlag | Boolean | Indicates that the Sequence Reset message is replacing administrative or application messages which will not be resent. Valid values: Y = Gap Fill message, MsgSeqNum field valid N = Sequence Reset, ignore MsgSeqNum |
141 | ResetSeqNumFlag | Boolean | Indicates that the both sides of the FIX session should reset sequence numbers. Valid values: Y = Yes, reset sequence numbers N = No |
146 | NoRelatedSym | NumInGroup | Specifies the number of repeating symbols specified. |
262 | MDReqID | String | Unique identifier for Market Data Request. MDReqId is restricted to a maximum of 16 lowercase hexadecimal characters [0123456789abcdef] with no leading 0 characters (this is a positive 64bit number represented in hexadecimal excluding 0). Must be unique for all current Market Data Requests. If a new Market Data Request (excluding unsubscribtion requests) is received with the same MDReqId as a current Market Data Request then the new request will be rejected as a duplicate. |
263 | SubscriptionRequestType | char | Subscription Request Type Valid values: 0 = Snapshot; 1 = Snapshot + Updates (Subscribe); 2 = Disable previous Snapshot + Update Request (Unsubscribe); |
264 | MarketDepth | int | Depth of market for Book Snapshot. DLTF supported values: 0 = Full Depth (DLTF supports a maximum of 20 levels of depth) 1 = Top of Book 2-20 = Report best N price tiers of data, up to 20 levels. |
265 | MDUpdateType | int | Specifies the type of Market Data update. DLTF supported values: 0 = Full Refresh |
266 | AggregatedBook | Boolean | Specifies whether or not book entries should be aggregated. Valid values: Y = one book entry per side per price N = Multiple entries per side per price allowed (Not specified) = broker option |
267 | NoMDEntryTypes | NumInGroup | Number of MDEntryType (269) fields requested. |
268 | NoMDEntries | NumInGroup | Number of entries in Market Data message. |
269 | MDEntryType | char | Type Market Data entry. DLTF supported values: 0 = Bid 1 = Offer |
270 | MDEntryPx | Price | Price of the Market Data Entry. |
271 | MDEntrySize | Qty | Quantity or volume represented by the Market Data Entry. |
272 | MDEntryDate | UTCDateOnly | Date of Market Data Entry. |
273 | MDEntryTime | UTCTimeOnly | Time of Market Data Entry. |
281 | MDReqRejReason | char | Reason for the rejection of a Market Data request. Valid values: 0 = Unknown symbol 1 = Duplicate MDReqID 2 = Insufficient Bandwidth 3 = Insufficient Permissions 4 = Unsupported SubscriptionRequestType 5 = Unsupported MarketDepth 6 = Unsupported MDUpdateType 7 = Unsupported AggregatedBook 8 = Unsupported MDEntryType 9 = Unsupported TradingSessionID A = Unsupported Scope B = Unsupported OpenCloseSettleFlag C = Unsupported MDImplicitDelete |
354 | EncodedTextLen | Length | Unused by DLTF. Byte length of encoded (non-ASCII characters) EncodedText (355) field. |
355 | EncodedText | data | Unused by DLTF. Encoded (non-ASCII characters) representation of the Text (58) field in the encoded format specified via the MessageEncoding (347) field. If used, the ASCII (English) representation should also be specified in the Text field. |
371 | RefTagID | int | The tag number of the FIX field being referenced. |
372 | RefMsgType | String | The MsgType (35) of the FIX message being referenced. |
373 | SessionRejectReason | int | Code to identify reason for a session-level Reject message. Valid values: 0 = Invalid tag number 1 = Required tag missing 2 = Tag not defined for this message type 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 7 = Decryption problem 8 = Signature problem 9 = CompID problem 10 = SendingTime accuracy problem 11 = Invalid MsgType 12 = XML Validation error 13 = Tag appears more than once 14 = Tag specified out of required order 15 = Repeating group fields out of order 16 = Incorrect NumInGroup count for repeating group 17 = Non “data” value includes field delimiter (SOH character) 99 = Other |
383 | MaxMessageSize | Length | Maximum number of bytes supported for a single message. |
384 | NoMsgTypes | NumInGroup | Number of MsgTypes (35) in repeating group. |
385 | MsgDirection | char | Specifies the direction of the messsage.Valid values: S = Send R = Receive |
464 | TestMessageIndicator | Boolean | Not supported by DLTF. |
553 | Username | String | DLTF username. This is required on the login message sent by the client |
554 | Password | String | DLTF Password or passphrase. This is required on the login message sent by the client |
789 | NextExpectedMsgSeqNum | SeqNum | Not supported by DLTF. |
Data Types
Data Type | Description |
---|---|
Boolean | char field containing one of two values: 'Y' = True/Yes 'N' = False/No |
char | Char value, can include any alphanumeric character or punctuation except the delimiter. All char fields are case sensitive (i.e. l != L). |
data | Binary (non-ASCII) data. |
int | Sequence of digits without commas or decimals and optional sign character (ASCII characters - and 0 - 9). The sign character utilizes one byte (i.e. positive int is 99999 while negative int is -99999). Note that int values may contain leading zeros (e.g. 00023 = 23). |
Length | Representing the length in bytes. Value must be positive. |
NumInGroup | Value that represents the number of repeating values in a group. |
Price | Value representing a price. Note the number of decimal places may vary. |
Qty | Value capable of storing either a whole number (no decimal places) of shares (securities denominated in whole units) or a decimal value containing decimal places for non-share quantity asset classes (securities denominated in fractional units). |
SeqNum | Representing a message sequence number. Value must be positive. |
String | Alpha-numeric free format strings; can include any character or punctuation except the delimiter. All char fields are case sensitive (i.e. dltf != DLTF). |
UTCTimestamp | Representing Time/date combination represented in UTC (Universal Time Coordinated, also known as GMT ) only accepted in this format : YYYYMMDD-HH:MM:SS (whole seconds). For example 20120321-17:15:03. |