---
title: "Administrative"
url: https://docs.truemarkets.co/api/fix/admin
description: "Log on, keep the session alive, recover sequence gaps and log out over a CeFi FIX session."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Administrative

Log on, keep the session alive, recover sequence gaps and log out. Every session, whether order entry, market data or drop copy, uses these messages.

## Logon (35=A)

| TAG  | NAME             | TYPE    | REQ | DESCRIPTION                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ---- | ---------------- | ------- | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 108  | HeartBtInt       | int     | Y   | Heartbeat interval (seconds).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 141  | ResetSeqNumFlag  | boolean | N   | Indicates both sides of the FIX session should reset sequence numbers.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| 553  | Username         | string  | Y   | Your API key's `key_id`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 554  | Password         | string  | Y   | A signature of the Logon. The message you sign is the concatenation, with no separators, of: `SendingTime + MsgType + MsgSeqNum + SenderCompID + TargetCompID + Username` - **ES256 API key** (created at app.truemarkets.co or dashboard.truemarkets.co): the raw 64-byte `r \|\| s` ES256 signature, base64url-encoded without padding. A key created at app.truemarkets.co trades only its own client; an organization key from dashboard.truemarkets.co covers every client in your organization. A session (SenderCompID and TargetCompID) stays bound to the key that first logged on to it. To move a session to a key created at app.truemarkets.co, use a new SenderCompID, and cancel open orders on the old session first. |
| 58   | Text             | string  | C   | **To Exchange** A space-separated tag value pair of session configuration parameters applicable for the current session until the next logon. Supported values: - `CancelOnDisconnect=Y` or `N`: cancel all open orders when the session ends. Off unless you set it. - `SelfTradePrevention=1` or `3`: the session's default self-trade prevention. Any other key rejects the Logon.                                                                                                                                                                                                                                                                                                                                                 |
| 98   | EncryptMethod    | int     | Y   | Method of encryption. No encryption methods are supported; set it to 0.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| 1137 | DefaultApplVerID | string  | Y   | Contains the version of the FIX protocol the exchange uses. Only FIX50SP2 is supported. Supported values: 9.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

The exchange answers a successful Logon with a Logon carrying HeartBtInt (108) and DefaultApplVerID (1137), and adopts the HeartBtInt you sent. A failed Logon gets a Reject (35=3) and the connection closes.

SendingTime (52) on every message must be no more than 5 seconds behind the exchange clock. A message older than that gets a Reject (35=3) with SessionRejectReason 10, SendingTime accuracy problem.

## BusinessReject (35=j)

| TAG | NAME                 | TYPE   | REQ | DESCRIPTION                                                                                                                                                                                            |
| --- | -------------------- | ------ | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 45  | RefSeqNum            | int    | Y   | The MsgSeqNum of the referenced message that was rejected.                                                                                                                                             |
| 372 | RefMsgType           | int    | Y   | The message type that this business-level reject message applies to: - `A`: Logon - `0`: Heartbeat - `1`: TestRequest - `D`: NewOrderSingle - `F`: OrderCancelRequest - `G`: OrderCancelReplaceRequest |
| 379 | BusinessRejectRefID  | string | Y   | The value of the business-level "ID" field on the message being referenced.                                                                                                                            |
| 380 | BusinessRejectReason | int    | N   | A code indicating the reason for the reject.                                                                                                                                                           |
| 58  | Text                 | string | Y   | A message explaining why the message was rejected.                                                                                                                                                     |

## Heartbeat (35=0)

| TAG | NAME      | TYPE   | REQ | DESCRIPTION                                                                                                                 |
| --- | --------- | ------ | --- | --------------------------------------------------------------------------------------------------------------------------- |
| 112 | TestReqId | string | C   | Unique identifier passed in the corresponding tag of a TestRequest. Required only when responding to a TestRequest message. |

## TestRequest (35=1)

| TAG | NAME          | TYPE   | REQ | DESCRIPTION                                                                             |
| --- | ------------- | ------ | --- | --------------------------------------------------------------------------------------- |
| 112 | TestRequestID | string | Y   | A unique identifier specified by the sender that must be provided back in the response. |

## ResendRequest (35=2)

| TAG | NAME       | TYPE | REQ | DESCRIPTION                                                                                                                                                                                                                                |
| --- | ---------- | ---- | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 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 then BeginSeqNo (7) = EndSeqNo. If request is for all messages subsequent to a particular message, EndSeqNo = 0 (representing infinity). |

## Reject (35=3)

| TAG | NAME                | TYPE   | REQ | DESCRIPTION                                        |
| --- | ------------------- | ------ | --- | -------------------------------------------------- |
| 45  | RefSeqNum           | int    | Y   | Sequence number of the rejected message.           |
| 371 | RefTagId            | int    | C   | FIX tag of the message contributing to the reject. |
| 372 | RefMsgType          | string | C   | Message type of the rejected message.              |
| 373 | SessionRejectReason | int    | C   | A code to describe the reason for the reject.      |
| 58  | Text                | string | C   | Additional explanation for the reject.             |

## SequenceReset (35=4)

| TAG | NAME        | TYPE    | REQ | DESCRIPTION                                                                                     |
| --- | ----------- | ------- | --- | ----------------------------------------------------------------------------------------------- |
| 123 | GapFillFlag | boolean | C   | Indicates a sequence gap during replay due to administrative messages that will not get resent. |
| 36  | NewSeqNo    | int     | Y   | The new sequence number to start using.                                                         |

## Logout (35=5)

| TAG  | NAME          | TYPE   | REQ | DESCRIPTION                                            |
| ---- | ------------- | ------ | --- | ------------------------------------------------------ |
| 1409 | SessionStatus | int    | C   | A code indicating the cause of the FIX session logout. |
| 58   | Text          | string | C   | Additional text describing context behind the logout.  |

Next: [Common components](https://docs.truemarkets.co/api/fix/common), the header, trailer and party group every message carries.