> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kraken.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Logon

> Authenticate and establish a US Perps drop copy session

<div className="api-banner">
  <span className="api-protocol fix">FIX</span>
  <span className="api-detail">session: drop copy</span>
  <span className="api-tag">35=A</span>
</div>

Opens the session and agrees its parameters: the heartbeat interval, whether both sides reset sequence numbers, and the credentials. Credentials are required: the logon is authenticated the same way as the Unified FIX v2 trading session, with the API key, the HMAC-SHA512 password signature and a nonce within five seconds of Kraken server time. Without them the logon fails. Must be the first message after the transport connection is established. Alongside the standard FIX 4.4 Logon fields it carries a NoMsgTypes group and venue-defined tags in the 5025 and 9000 ranges: Nonce, user and publication preferences, and ApplicationName / Version / Vendor identification.

**Direction:** Either direction

***

<ResponseField name="header" type="" required>35=`A`</ResponseField>

<ResponseField name="98 - EncryptMethod" type="integer" required>
  Encryption method for the session. Where TLS protects the transport the only meaningful value is 0 (None).

  **Possible values:**

  * `0` : None.
  * `1` : PKCS.
  * `2` : DES.
  * `3` : PKCS/DES.
  * `4` : PGP/DES.
  * `5` : PGP/DES-MD5.
  * `6` : PEM/DES-MD5.
</ResponseField>

<ResponseField name="108 - HeartbeatInt" type="integer" required>
  Heartbeat interval in seconds. This dialect names the field HeartbeatInt rather than the FIX 4.4 standard HeartBtInt.

  **Format:** Interval in seconds.
</ResponseField>

<ResponseField name="95 - RawDataLength" type="Length">
  Length in bytes of the RawData field that follows.

  **Format:** Byte count.

  <span className="field-attr">Required:</span> Conditional
</ResponseField>

<ResponseField name="96 - RawData" type="data">
  Free-form binary payload. Not used for credentials; send them in Username (553) and Password (554).

  **Format:** Raw data; length given by RawDataLength (95).

  <span className="field-attr">Required:</span> Conditional
</ResponseField>

<ResponseField name="141 - ResetSeqNumFlag" type="boolean">
  Whether both sides reset their sequence numbers to 1 on this logon.

  **Possible values:**

  * `Y` : Both sides reset MsgSeqNum to 1. Use on a first connect or after a session reset.
  * `N` : Continue the existing sequence. Expect a ResendRequest if there is a gap.
</ResponseField>

<ResponseField name="789 - NextExpectedMsgSeqNum" type="SeqNum">
  Next MsgSeqNum the sender expects to receive. An alternative to a Resend Request for resynchronising at logon.

  **Format:** Sequence number.
</ResponseField>

<ResponseField name="383 - MaxMessageSize" type="Length">
  Largest message in bytes the sender is willing to receive.

  **Format:** Byte count.
</ResponseField>

<ResponseField name="384 - NoMsgTypes" type="NumInGroup">
  Number of message-type entries that follow, declaring which message types the session will send or receive.

  <span className="field-attr">Required:</span> Conditional

  <Expandable title="repeating group">
    <ResponseField name="372 - RefMsgType" type="string">
      MsgType being referred to.

      **Format:** Any MsgType value.
    </ResponseField>

    <ResponseField name="385 - MsgDirection" type="char">
      Whether the referenced message type is sent or received by the party declaring it.

      **Possible values:**

      * `S` : The session sends this message type.
      * `R` : The session receives this message type.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="464 - TestMessageIndicator" type="boolean">
  Whether this session is a test session rather than production.

  **Possible values:**

  * `Y` : Yes.
  * `N` : No.
</ResponseField>

<ResponseField name="553 - Username" type="string" required>
  Your FIX API key, created in Kraken Pro settings with FIX as the key type.
</ResponseField>

<ResponseField name="554 - Password" type="string" required>
  Base64 HMAC-SHA512 signature over the logon fields and the nonce, keyed with the base64-decoded API secret.

  **Format:** base64( HMAC-SHA512( base64decode(secret), SHA256(message input + nonce) ) )
</ResponseField>

<ResponseField name="5025 - Nonce" type="string" required>
  Current time in milliseconds since the Unix epoch, as a string, within five seconds of Kraken server time. The same value must appear in the password input. Clock drift is the commonest cause of logon failure.

  **Format:** Milliseconds since the Unix epoch, as a string, within 5 s of Kraken server time.
</ResponseField>

<ResponseField name="9001 - UserType" type="integer">
  Venue-defined. Category of user establishing the session.

  **Format:** Venue-defined integer.
</ResponseField>

<ResponseField name="9006 - StrategyPreference" type="integer">
  Venue-defined. Strategy handling preference for the session.

  **Format:** Venue-defined integer.
</ResponseField>

<ResponseField name="9007 - TimeStampPreference" type="integer">
  Venue-defined. Timestamp granularity or format preference for the session.

  **Format:** Venue-defined integer.
</ResponseField>

<ResponseField name="9008 - PublishClearingAllocations" type="integer">
  Venue-defined. Whether clearing allocations are published to this session.

  **Format:** Venue-defined integer.
</ResponseField>

<ResponseField name="9009 - PublishMiFIDRegisteredDetails" type="integer">
  Venue-defined. Whether MiFID registered details are published to this session.

  **Format:** Venue-defined integer.
</ResponseField>

<ResponseField name="9010 - PublishMktCreationRealtime" type="integer">
  Venue-defined. Whether market creation events are published to this session in real time.

  **Format:** Venue-defined integer.
</ResponseField>

<ResponseField name="9450 - ApplicationName" type="string">
  Venue-defined. Name of the client application connecting.
</ResponseField>

<ResponseField name="9451 - ApplicationVersion" type="string">
  Venue-defined. Version of the client application.
</ResponseField>

<ResponseField name="9452 - ApplicationVendor" type="string">
  Venue-defined. Vendor of the client application.
</ResponseField>

<ResponseField name="trailer" type="" required />
