After establishing your TCP connection with the CQG gateway, a Logon must be the first message that the FIX client sends. This sequence must start with sequence number 1 unless session persistence is enabled for the particular vendor. If session persistence is enabled, the client can send the last sent sequence number in Logon message with ResetSeqNumFlag set to ‘N’. The CQG gateway responds with its own Logon. The client must wait for that Logon before sending additional messages. If logon fails because a trader requires a one-time password (OTP) and that OTP wasn’t provided, FIX Service returns a Logout message with explanatory text.
Tag |
Name |
Format |
Req |
Comments |
|
Standard Header |
|
Y |
MsgType = A Must have SenderSubID value set. |
96 |
RawData |
String(64) |
Y* |
Plain text password to authenticate the user. This field is not included in Logon response by the CQG gateway. |
98 |
EncryptMethod |
Int |
Y |
Only 0 (None) is expected. |
108 |
HeartBtInt |
Int |
Y |
Heartbeat interval (seconds). Recommended interval is between 30-60 seconds. If you submit a value of less than 10 seconds, the logon is rejected. |
141 |
ResetSeqNumFlag |
Boolean |
N |
Indicates both sides of a FIX session should reset sequence numbers. |
20030 |
OneTimePassword |
String(24) |
N |
One-time password. Must be specified for users configured to require 2-factor authentication (static password + one-time password). This field is not included in Logon response by the CQG gateway. |
20190 |
InactivityTimeout |
Int |
N |
Client application should close/disable FIX session after a given number of minutes of inactivity. This tag is provided in Logon message sent by CQG to FIX client. |
|
Standard Trailer |
|
Y |
|
Example: Logon
8=FIX.4.2V9=118V35=AV49=fix_clientV56=CQG_GatewayV34=1V50=FastTradeIncV52=20061124-15:47:02.951V98=0V108=30V95=10V96=fix_clientV141=YV10=253V
Logout (5)
The Logout message is the last message sent on the connection. Either the CQG gateway or a client can send the Logout message.
Note: When Logout is sent by CQG in response to unsuccessful logon attempt, its header does not contain the MsgSeqNum field in most of the cases. This way an existing FIX session is kept intact, and its sequence numbers are not affected by other logon attempts.
Tag |
Name |
Format |
Req |
Comments |
|
Standard Header |
|
Y |
MsgType = 5 |
58 |
Text |
String |
N |
Free format text string. |
|
Standard Trailer |
|
Y |
|
Example: Logout
8=FIX.4.2V9=99V35=5V49=CQG_GatewayV56=fix_clientV34=25V52=20061124-15:59:50.524 V58=NormalLogoutInitiatedByCounterpartyV10=054V
Heartbeat (0)
The Heartbeat monitors the status of the communication link. It is sent automatically based on the interval set in the Logon message.
Tag |
Name |
Format |
Req |
Comments |
|
Standard Header |
|
Y |
MsgType = 0 |
112 |
TestReqID |
String |
C |
Required when the heartbeat is the result of a Test Request message. |
|
Standard Trailer |
|
Y |
|
Example: Heartbeat
8=FIX.4.2V9=79V35=1V49=CQG_GatewayV56=fix_client V34=2V52=20061124-15:50:32.215V112=PostLogon_00001V10=194V
Reject (3)
The CQG gateway uses this message to respond to a message that could not be processed. Rejections for unsupported tags, invalid message format, or field restrictions are also identified. Where applicable, the reason for the reject is included in tag 58. This session level reject message can be sent in response to any message sent from the FIX client to the CQG gateway.
Tag |
Name |
Format |
Req |
Comments |
|
Standard Header |
|
Y |
MsgType = 3 |
45 |
RefSeqNum |
Int |
Y |
MsgSeqNum of rejected message. |
58 |
Text |
String |
N |
Where possible, message to explain the reason for rejection. |
371 |
RefTagID |
Int |
N |
Tag number of the FIX field being referenced, if any. |
372 |
RefMsgType |
String |
N |
MsgType of the FIX message being referenced. |
373 |
SessionRejectReason |
Int |
N |
Code to identify the 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 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 99 = Other (to be used for cases like conditional tag problems) |
|
Standard Trailer |
|
Y |
|
Example: Reject
8=FIX.4.2V9=112V35=3V49=CQG_GatewayV56=fix_clientV34=18V52=20061124-15:56:56.259V45=17V372=UANV371=50724V373=1V58=RequiredTagMissingV10=002V
Resend Request (2)
In the event that a sequence number gap is detected, the Resend Request message notifies the opposite party to resend messages.
Tag |
Name |
Format |
Req |
Comments |
|
Standard Header |
|
Y |
MsgType = 2 |
7 |
BeginSeqNo |
Int |
Y |
Message sequence number of first message in range to be resent. |
16 |
EndSeqNo |
Int |
Y |
Message sequence number of last message in range to be resent. If request is for a single message BeginSeqNo = EndSeqNo. If request is for all messages subsequent to a particular message, EndSeqNo = 0 (representing infinity). |
|
Standard Trailer |
|
Y |
|
Example: Resend Request
8=FIX.4.2V9=68V35=2V49=CQG_GatewayV56=fix_clientV34=2V52=20061122-13:41:39.267V7=1V16=0V10=127V
Sequence Reset (4)
In the event that either system detects an error in sequence numbers, this message is sent to rectify the situation.
Tag |
Name |
Format |
Req |
Comments |
|
Standard Header |
|
Y |
MsgType = 4 |
36 |
NewSeqNo |
Int |
Y |
New sequence number. |
123 |
GapFillFlag |
Boolean |
N |
Indicates that the Sequence Reset message is replacing administrative or application messages that will not be resent. Valid values: Y = Gap Fill message, MsgSeqNum field valid N = Sequence Reset, ignore MsgSeqNum |
|
Standard Trailer |
|
Y |
|
Example: Sequence Reset
8=FIX.4.2V9=68V35=2V49=CQG_GatewayV56=fix_clientV34=12V52=20061122-13:41:39.267V36=10V10=127V
Test Request (1)
The Test Request is used to force a heartbeat in order to verify connectivity status and sequence number generation.
Tag |
Name |
Format |
Req |
Comments |
|
Standard Header |
|
Y |
1 |
112 |
TestReqID |
String |
Y |
Identifier included in Test Request message to be returned in resulting Heartbeat. |
|
Standard Trailer |
|
Y |
|
Example: Test Request
8=FIX.4.2V9=79V35=1V49=CQG_GatewayV56=fix_clientV34=2V52=20061124-16:02:26.054 V112=PostLogon_00001V10=196V