---
title: "Update an account risk limit"
method: PUT
path: "/rest/api/v1/accounts/{accountId}/riskLimits/{riskLimitId}"
tags: ["Account API"]
---

# Update an account risk limit

`PUT /rest/api/v1/accounts/{accountId}/riskLimits/{riskLimitId}`

## Path parameters

- `accountId` string, uuid, required
- `riskLimitId` string, uuid, required

## Request body

- RiskLimitDTO
  - `absoluteRiskLimit` number — Enter an absolute risk limit in account currency. Set to 0 to deactivate.
  - `accountId` string, uuid — You have to set it during resource creation, after that, it is only read-only
  - `active` boolean
  - `closeAllOpenPositions` boolean — If set to 'true', all positions will be closed immediately when the primary risk limit is reached. If set to 'false', new trades will not be opened when the primary limit is reached, but the fallback limits become active as a secondary safety measure.
  - `copierId` string, uuid — You have to set it during resource creation, after that, it is only read-only
  - `fallbackAbsoluteRiskLimit` number — Fallback absolute risk limit in account currency. Only applies when closeAllOpenPositions is false. When this limit is reached, all positions will be closed. Set to 0 to deactivate.
  - `fallbackRelativeRiskLimit` number — Fallback relative risk limit in account currency. Only applies when closeAllOpenPositions is false. When this limit is reached, all positions will be closed. Set to 0 to deactivate.
  - `fallbackRiskLimit` number — Fallback risk limit (percentage). Only applies when closeAllOpenPositions is false. When this limit is reached, all positions will be closed. Set to 0 to deactivate.
  - `fulfillSeconds` integer — If set to 5, it means that if the limit is reached and stays over the limit for 5 seconds, the risk limit will be activated; otherwise, the limit will remain deactivated
  - `id` string, uuid
  - `relativeRiskLimit` number — Enter an relative risk limit in account currency. Set to 0 to deactivate.
  - `resetTime` string, date-time — ISO 8601. Set the reset time for calculation (see riskType). Only used for 1-3 risk type. Only the time is considered, and the date is ignored.
  - `riskLimit` number, required — 0.215 for 21.5% (set to 0 to deactivate)
  - `riskType` RiskTypeDTO, required — You have to set it during resource creation, after that, it is only read-only. You have only to set the id, e.g. 4 for actual drawdown. 1: Daily, 2: Weekly, 3: Monthly, 4: Actual, 5: Equity-equity daily, 6: Equity-equity weekly, 7: Equity-equity monthly, 8: Smart reference daily, 9: Smart reference weekly, 10: Smart reference monthly. When you set a daily risk limit of 0.5 (50%), it means that if the ratio of the balance at a specific timepoint (see resetTime) to equity reaches 50%, the copy trading will be paused, and if specified, all trades will be closed (see closeAllOpenPositions). The limit reference type depends on the selected risk type: • Balance-based limits use the balance as reference. • Equity-based limits use the equity as reference. • Smart limits use the greater of balance and equity as reference. Example: {id: 1}
    - `id` integer, required
    - `name` string

## Response `200`

OK

- RiskLimitDTO
  - `absoluteRiskLimit` number — Enter an absolute risk limit in account currency. Set to 0 to deactivate.
  - `accountId` string, uuid — You have to set it during resource creation, after that, it is only read-only
  - `active` boolean
  - `closeAllOpenPositions` boolean — If set to 'true', all positions will be closed immediately when the primary risk limit is reached. If set to 'false', new trades will not be opened when the primary limit is reached, but the fallback limits become active as a secondary safety measure.
  - `copierId` string, uuid — You have to set it during resource creation, after that, it is only read-only
  - `fallbackAbsoluteRiskLimit` number — Fallback absolute risk limit in account currency. Only applies when closeAllOpenPositions is false. When this limit is reached, all positions will be closed. Set to 0 to deactivate.
  - `fallbackRelativeRiskLimit` number — Fallback relative risk limit in account currency. Only applies when closeAllOpenPositions is false. When this limit is reached, all positions will be closed. Set to 0 to deactivate.
  - `fallbackRiskLimit` number — Fallback risk limit (percentage). Only applies when closeAllOpenPositions is false. When this limit is reached, all positions will be closed. Set to 0 to deactivate.
  - `fulfillSeconds` integer — If set to 5, it means that if the limit is reached and stays over the limit for 5 seconds, the risk limit will be activated; otherwise, the limit will remain deactivated
  - `id` string, uuid
  - `relativeRiskLimit` number — Enter an relative risk limit in account currency. Set to 0 to deactivate.
  - `resetTime` string, date-time — ISO 8601. Set the reset time for calculation (see riskType). Only used for 1-3 risk type. Only the time is considered, and the date is ignored.
  - `riskLimit` number, required — 0.215 for 21.5% (set to 0 to deactivate)
  - `riskType` RiskTypeDTO, required — You have to set it during resource creation, after that, it is only read-only. You have only to set the id, e.g. 4 for actual drawdown. 1: Daily, 2: Weekly, 3: Monthly, 4: Actual, 5: Equity-equity daily, 6: Equity-equity weekly, 7: Equity-equity monthly, 8: Smart reference daily, 9: Smart reference weekly, 10: Smart reference monthly. When you set a daily risk limit of 0.5 (50%), it means that if the ratio of the balance at a specific timepoint (see resetTime) to equity reaches 50%, the copy trading will be paused, and if specified, all trades will be closed (see closeAllOpenPositions). The limit reference type depends on the selected risk type: • Balance-based limits use the balance as reference. • Equity-based limits use the equity as reference. • Smart limits use the greater of balance and equity as reference. Example: {id: 1}
    - `id` integer, required
    - `name` string

---

[API](https://skmtc.net/metacopier/apis/metacopier-api.md) · [All operations](https://skmtc.net/metacopier/apis/metacopier-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/metacopier/metacopier-api/revisions/ff1699330afa/schema)
