Skip to content

Reset stop outs#

About#

Resets a stop out. Please note that before resetting a stopout vis this API you need to adjust startTime setting of your stopout or risk limit configuration of your subscription.

POST /users/current/subscribers/:subscriberId/subscription-strategies/:strategyId/stopouts/:reason/reset

For more information see Swagger documentation

Headers#

Name Type Required Description
auth-token string Yes authorization token. See Authentication & authorization

Path parameters#

Name Type Required Description
strategyId string Yes strategy id
subscriberId string Yes subscriber id
reason string Yes reason of a stop out to reset. Formed by concatenation of risk limit type and apply to values. One of year-balance-difference, year-to-date-balance-difference, quarter-balance-difference, quarter-to-date-balance-difference, month-balance-difference, month-to-date-balance-difference, week-balance-difference, week-to-date-balance-difference, day-balance-difference, date-balance-difference, lifetime-balance-difference, year-balance-minus-equity, year-to-date-balance-minus-equity, quarter-balance-minus-equity, quarter-to-date-balance-minus-equity, month-balance-minus-equity, month-to-date-balance-minus-equity, week-balance-minus-equity, week-to-date-balance-minus-equity, day-balance-minus-equity, date-balance-minus-equity, lifetime-balance-minus-equity, year-equity-difference, year-to-date-equity-difference, quarter-equity-difference, quarter-to-date-equity-difference, month-equity-difference, month-to-date-equity-difference, week-equity-difference, week-to-date-equity-difference, day-equity-difference, date-equity-difference, lifetime-equity-difference

Response#

Responses:

  • 204 - Stopouts were reset successfully
  • 401 - Authorization failed. Response schema: Error
  • 404 - Subscriber not found. Response schema: Error

Examples#

Example request:

First step is to adjust the startTime setting on the stopout or risk limit configuration or both. See Update subscriber API for more details.

curl -X PUT --header 'Accept: application/json' --header 'auth-token: token' -d '{
  "name": "Demo account",
  "accountId": "105646d8-8c97-4d4d-9b74-413bd66cd4ed",
  "subscriptions": [
    {
      "strategyId": "SMKn",
      "multiplier": 1,
      ... (other settings go here)
      "stopOutRisk": {
        "absoluteValue": 0.05,
        "relativeValue": 0.2,
        "startFrom": "2021-03-22T00:00:00.000Z" (current time)
      },
      "riskLimits": [
        {
          ... (risk limit settings go here)
          "startFrom": "2021-03-22T00:00:00.000Z" (current time)
        }
      ]
    }
  ]
}' 'https://copyfactory-api-v1.vint-hill.agiliumtrade.ai/users/current/configuration/subscribers/105646d8-8c97-4d4d-9b74-413bd66cd4ed'

Finally, you can reset the stopout so that trading can continue.

curl -X POST --header 'Accept: application/json' --header 'auth-token: token' 'https://copyfactory-api-v1.vint-hill.agiliumtrade.ai/users/current/subscribers/105646d8-8c97-4d4d-9b74-413bd66cd4ed/subscription-strategies/iERv/stopouts/max-drawdown/reset'