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

# Set max-loss level

> POST /v1/balances/{account_id}/max-loss/level — raise the live max-loss floor to an absolute dollar level.

Use this after a payout when the account still has unused drawdown and the floor should sit higher **right now**. The [max-loss cap](https://docs.tradara.com/prop-firm/operations/max-loss-limit.md) only stops the floor from rising. It does not lift a floor that is still below the ceiling.

```http theme={null}
POST /v1/balances/{account_id}/max-loss/level
```

`operationId: setMaxLossLevel`

A firm API key can call this route for an account in its firm. The operation:

1. Stores `max_loss_level` as the lowest place the max-loss floor may sit.
2. Leaves cash, peaks, and realized P\&L unchanged.
3. Publishes `balance.updated` so live risk enforcement recomputes `max_loss_limit_trigger`.

The live floor becomes the higher of the normal trailing floor and this level. A trailing floor that is already higher stays there, so the account can still trail up. The drawdown cap still pulls the floor down: a level above the current ceiling does not take effect until the ceiling is at least that high.

## Example

An end-of-day account has a `$54,000` peak, a `$6,000` allowance, and a floor at `$48,000`. A `$2,000` payout leaves the cash balance at `$52,000`. The floor stays at `$48,000` until you move it.

```text theme={null}
Cash after payout:     $52,000.00
Previous floor:        $48,000.00
New floor:             $50,100.00
Cap ceiling:           $50,100.00
```

Set the ceiling with [Set max loss limit](https://docs.tradara.com/prop-firm/operations/max-loss-limit.md). `max_drawdown_limit` is a signed offset from **starting** balance, not the absolute ceiling. If the account started at `$50,000`, a ceiling of `$50,100` is `"100"`.

```bash theme={null}
curl -X PATCH "$TRADARA_BASE_URL/v1/firm-control/accounts/$ACCOUNT_ID/max-loss-limit" \
  -H "X-Tradara-Api-Key: $TRADARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "max_drawdown_limit": "100",
    "reason_code": "PAYOUT"
  }'
```

Then place the floor:

```bash theme={null}
curl -X POST "$TRADARA_BASE_URL/v1/balances/$ACCOUNT_ID/max-loss/level" \
  -H "X-Tradara-Api-Key: $TRADARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason_code": "PAYOUT",
    "max_loss_level": "50100.00"
  }'
```

Either call can go first. Confirm the live floor with
[`GET /v1/firm-control/accounts/{account_id}/risk-state`](https://docs.tradara.com/prop-firm/operations/risk-state)
(`max_loss_limit_trigger`). That value is `$50,100` only when the ceiling is `$50,100` or higher.

The payout withdrawal itself is still
[`POST /v1/balances/{account_id}/adjust`](https://docs.tradara.com/prop-firm/operations/adjust-balance).
This route does not move cash.

This does not move the daily-loss floor. Use
[Set daily-loss trigger](https://docs.tradara.com/prop-firm/operations/set-daily-loss-trigger.md) for that.

## Body

| Field | Required | Notes |
| - | - | - |
| `reason_code` | yes | Operator reason, for example `PAYOUT`. At most 24 characters. |
| `max_loss_level` | yes | Absolute dollar level, for example `"50100.00"`. |

## Response — `200 OK`

```json theme={null}
{
  "account_id": "5b1c8a2e-9f2d-4d3c-b6f0-2b6c5b6e1f9a",
  "reason_code": "PAYOUT",
  "previous_max_loss_level": "",
  "max_loss_level": "50100.00",
  "balance": {
    "account_id": "5b1c8a2e-9f2d-4d3c-b6f0-2b6c5b6e1f9a",
    "balance": "52000.00",
    "operator_max_loss_level": "50100.00"
  }
}
```

`previous_max_loss_level` is empty when the account had no firm-set level. `balance` is the full balance row and is otherwise unchanged.

## Errors

| HTTP | Meaning |
| - | - |
| `400` | Missing reason, reason longer than 24 characters, or `max_loss_level` is not a decimal. |
| `403` | Caller is neither a platform admin nor a firm operator. |
| `404` | Account is unknown or not in your firm. |
| `421` | This balances replica does not own the account. Retry the request. |
| `503` | The level write is not available on this process. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.