# 5 (Logout)

The **`5` (Logout)** message is used to terminate (or confirm termination) of a FIX session.

The Logout message can be sent by either party to indicate the end of communication.

A logout message is a normal way to end a FIX session, and it allows the parties involved to gracefully disconnect. 

:::note
The **141** `ResetSeqNumFlag` field in the [**`A` (Logon)**](/docs/guides/exchange-fix-api/market-data-fix-api/supported-fix-messages/fix-session-level-messages/message-A-logon) message is set to `Y` if a reset of sequence numbers is desired during the next logon.
:::

| Tag      | Name     | Type       | Required                                    | Description      |
| -------- | -------- | ---------- | ------------------------------------------- | ---------------- |
| **58**   | `Text`   | `String`   | **no**                                      | Logout reason.   |

For a sample message and other details, see [`FIX 4.4 : Logout <5> message` in the FIX 4.4 documentation](https://www.onixs.biz/fix-dictionary/4.4/msgType_5_5.html).