Logon (35=A)
Initiate FIX session with authentication credentials.FIX Digital Signature
For FIX API, the Logon (35=A) message has to be invoked ONCE per session, with the Digital Signature as Password (554) and API key as UserName (553) to be part of the message. Once authenticated, you will gain access to a FIX session, and no longer need to use the pass in the Digital Signature and API key anymore for the duration of the session.
The authentication is based on the pairing of the API Key, along with the HMAC-SHA256 hash of the request parameters using the API Secret as the cryptographic key.
You should NEVER explicitly include the API Secret Key in plain-text in your request
The algorithm for generating the HMAC-SHA256 signature is as follows:
- Concatenate based on flow type:
- (Case i. Order Management Flow)
"public/auth" + MsgSeqNum (34) + api_key + "system_labelONEEX" + RawData (96) - (Case ii. Market Data Flow)
"public/auth" + MsgSeqNum (34) + api_key + RawData (96) - (Case iii. Drop Copy Flow)
"public/auth" + MsgSeqNum (34) + api_key + "system_labelONEEX" + RawData (96)
- (Case i. Order Management Flow)
- Use HMAC-SHA256 to hash the above using the API Secret as the cryptographic key
- Encode the output as a hex string -- this is your Digital Signature
The above method is similar to sign a Digital Signature for REST / WS, with the following equivalent field mappings:
| FIX Tag | Equivalent WS / REST Field for Signing Digital Signature |
|---|---|
| MsgType (35) | method |
| MsgSeqNum (34) | id |
| UserName (553) | api_key |
| RawData (96) | nonce in milliseconds |
| Password (554) | sig |
Please refer to the respective section to sign a Digital Signature for REST / WS for sample code.
Remarks
We recommend adding 50 ms wait interval after receiving 35=A on both side, before sending first request.
The FIX gateway maintenance (Order Management flow only) will be carried out on second Thursday 07:05-07:15 (UTC) monthly. Please disconnect on 07:04 (UTC) and reconnect on 07:15 (UTC) with sequence number 1/1.
Other options for client preferences:
Option 1: Sequence number resets require by clients to LOGOFF and then LOGIN again using the Logon [A] message with the ResetSeqNumFlag (141) set to 'Y'. This resets the sequence numbers on both sides. Clients are free to perform this action whenever is convenient for their own schedule and set-up.
Option 2: Crypto.com FIX connections shall establish a cap to prevent sequence number counter overflow; Our FIX engine shall trigger disconnection and reset the sequence number to 1/1, either the inbound or outbound sequence number reach 2,147,480,000
Request
Body
required
Length of RawData field
Please refer FIX Digital Signature for details
Must be 98=0
Heartbeat interval in seconds.
Possible values: [Y, N]
Indicates that both sides of the FIX session should reset sequence numbers.
API Key
Please refer FIX Digital Signature for details
Possible values: [Y]
Y: Enabled for the open order placed by this session/connection.
'0': Disable, '3': Enable
Possible values: [A]
Message Type = A (Logon)
Schema
Length of RawData field
Please refer FIX Digital Signature for details
Must be 98=0
Heartbeat interval in seconds.
Possible values: [Y, N]
Indicates that both sides of the FIX session should reset sequence numbers.
API Key
Please refer FIX Digital Signature for details
Possible values: [Y]
Y: Enabled for the open order placed by this session/connection.
'0': Disable, '3': Enable
Possible values: [A]
Message Type = A (Logon)