Session Statuses
Overview
The article describes session statuses.
The description of session statuses is provided below.

| Session Status | Session Status Description |
|---|---|
| Disconnected | The session is disconnected from the server. From this status, the session is transferred to the Connecting status in case the user tries to log in. Note: before release the session and close the application on Linux wait until the status becomes "disconnected". |
| Connecting | The user specified login information and the session is being connected to the server. From this status, the session can be transferred to one of the following statuses: Connected In case the login was successful, the session is transferred to the Connected status. TradingSessionRequested This status is possible only on connections having more than one trading session or requiring a PIN code. The session is transferred to the status TradingSessionRequested when it was requested to specify a PIN or database. Disconnected In case the login failed, the session is transferred to the Disconnected status. |
| Connected | The login was successful, the session is connected successfully. For connections with multiple trading sessions or requiring a PIN code, a valid PIN or database was specified, the session is connected successfully. This is the only status when most of the methods of the session object can be used. From this status, the session can be transferred to one of the following statuses: Disconnecting In case the user logged out, the session is transferred to the Disconnecting status. Reconnecting In case the connection was lost, the session is transferred to the Reconnecting status. PriceSessionReconnecting This status is possible only on connections with the price session. The session is transferred to this status in case the connection with the price session was lost. SessionLost In case the session expired or the server was shut down, the session is transferred to the status SessionLost. |
| Reconnecting | For connections without the price session: The connection was lost. The core is attempting to restore the connection.For connections with the price session: The connection with the price session was lost and either: 1. The connection with the trade session exists but the maximum number of attempts to reconnect to the price sessionwas reached (currently 20) or 2. The connection with the trade session was lost. The core is attempting to restore the connection with the trade session. From this status, the session can be transferred to one of the following statuses: Reconnecting For connections without the price session: The core attempts to restore the connection and stays in this status after each unsuccessful attempt until the maximum number of attempts to reconnect is reached (currently 20). For connections with the price session: 1. If the maximum number of attempts to reconnect to the price session was reached, the core attempts to restore the connection with the trade session only once. 2. If the connection with the trade session was lost, the session makes the maximum number of attempts to restore the connection with the trade session and then with the price session. Connected If the connection was restored, the session is transferred to the Connected status. Disconnected The reconnect failed or the maximum number of attempts to reconnect was reached (currently 20), ForexConnect closes the session, and the Disconnected status is received. Note: Session status should be set as Disconnected immediately for login by SSO Token or JWT without attempts to reconnect. |
| Table of Contents | |
|---|---|
| Trading Concepts An introduction to the fundamental concepts of Forex trading |
|
| What is an API and how does it work This article explains what APIs are and how they work |
|
| What are the different types of APIs and how are they used for trading This article describes the different types of APIs |
|
| How can you access our API and what are its advantages This article explains how to get access to our API |
|
| How can you use our API to implement trading strategies and algorithms This article explains how you canuse our API |
|
| Trading Commissions This article describes commissions that may be charged by a brokerage. |
|
| Session Statuses The article describes session statuses. |