# Change how eagerly the account stays connected

URL: https://docs.fxapis.com/api-reference/lifecycle/change-how-eagerly-the-account-stays-connected

> Change how eagerly the account stays connected. always_on: stays connected.

`POST https://api.fxapis.com/v1/accounts/{id}/mode`

`always_on`: stays connected. `warm_on_demand`: connects on demand (the first order, or a prepare) and goes offline by itself when idle. `cold`: connects only when you ask.

Takes effect the next time the account is brought online, so the call stays fast and predictable. Switch to `always_on` and then bring the account online to apply it now.

A copy-trading strategy's account must stay `always_on`: moving it to another mode is refused with 409 `ACCOUNT_IS_MASTER` until the strategy is archived.

Authentication: `Authorization: Bearer <API key>`.

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |

#### Request body (application/json, required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `mode` | "always_on" \| "warm_on_demand" \| "cold" | yes |  |

#### Responses

- `200`
- `400`
- `401`
- `402`
- `404`
- `409`

Failures return `{ "error": { "code", "message" } }`; every code is listed at https://docs.fxapis.com/errors.

#### 200 response fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object | no |  |
| `data.accountId` | string (uuid) | no |  |
| `data.mode` | "always_on" \| "warm_on_demand" \| "cold" | no |  |
| `data.restingState` | string | no | Where the account sits when idle under this mode. |