Skip to main content

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:

  1. 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)
  2. Use HMAC-SHA256 to hash the above using the API Secret as the cryptographic key
  3. 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 TagEquivalent 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
    RawDataLength Tag 95 (integer)required

    Length of RawData field

    RawData Tag 96 (string)required

    Please refer FIX Digital Signature for details

    EncryptMethod Tag 98 (integer)required

    Must be 98=0

    HeartBtInt Tag 108 (integer)required

    Heartbeat interval in seconds.

    ResetSeqNumFlag Tag 141 (string)

    Possible values: [Y, N]

    Indicates that both sides of the FIX session should reset sequence numbers.

    Username Tag 553 (string)required

    API Key

    Password Tag 554 (string)required

    Please refer FIX Digital Signature for details

    CancelOnDisconnectScope Tag 6867 (string)

    Possible values: [Y]

    Y: Enabled for the open order placed by this session/connection.

    CancelOnDisconnectType Tag 35002 (integer)

    '0': Disable, '3': Enable

    MsgType Tag 35 (string)

    Possible values: [A]

    Message Type = A (Logon)

Logon accepted
Schema
    RawDataLength Tag 95 (integer)required

    Length of RawData field

    RawData Tag 96 (string)required

    Please refer FIX Digital Signature for details

    EncryptMethod Tag 98 (integer)required

    Must be 98=0

    HeartBtInt Tag 108 (integer)required

    Heartbeat interval in seconds.

    ResetSeqNumFlag Tag 141 (string)

    Possible values: [Y, N]

    Indicates that both sides of the FIX session should reset sequence numbers.

    Username Tag 553 (string)required

    API Key

    Password Tag 554 (string)required

    Please refer FIX Digital Signature for details

    CancelOnDisconnectScope Tag 6867 (string)

    Possible values: [Y]

    Y: Enabled for the open order placed by this session/connection.

    CancelOnDisconnectType Tag 35002 (integer)

    '0': Disable, '3': Enable

    MsgType Tag 35 (string)

    Possible values: [A]

    Message Type = A (Logon)