Skip to content

Update portfolio strategy#

About#

Updates provider portfolio

PUT /users/current/configuration/portfolio-strategies/:portfolioId

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
portfolioId string Yes portfolio id

Body#

Account payload schema: UpdatedPortfolioStrategy

Response#

Responses:

  • 204 - PortfolioStrategy saved successfully.
  • 400 - PortfolioStrategy payload validation failed. Response schema: Error
  • 401 - Authorization failed. Response schema: Error

Examples#

Example request:

curl -X PUT --header 'Accept: application/json' --header 'auth-token: token' -d '{
"name": "Test strategy",
"description": "Some useful description about your strategy",
"members": [
  {
    "strategyId": "AeRF",
    "multiplier": 1,
    "skipPendingOrders": true,
    "maxTradeRisk": 0.4,
    "reverse": true,
    "reduceCorrelations": "by-strategy",
    "stopOutRisk": {
      "value": 150,
      "startTime": "2020-08-24T00:00:00.000Z"
    },
    "symbolFilter": {
      "included": [
        "EURUSD"
      ]
    },
    "newsFilter": {
      "calendarNewsFilter": {
        "priorities": [
          "election"
        ],
        "closePositionTimeGapInMinutes": 10,
        "openPositionPrecedingTimeGapInMinutes": 20,
        "openPositionFollowingTimeGapInMinutes": 20
      }
    },
    "riskLimits": [
      {
        "type": "daily",
        "applyTo": "balance",
        "maxRisk": 0.4,
        "closePositions": true,
        "startTime": "2020-08-24T00:00:00.000Z"
      }
    ],
    "maxStopLoss": {
      "value": 150,
      "units": "pips"
    },
    "maxLeverage": 50,
    "symbolMapping": [
      {
        "to": "EURUSD",
        "from": "EURUSD.m"
      }
    ],
    "tradeSizeScalingMode": "none"
  }
],
"commissionScheme": {
  "type": "flat-fee",
  "billingPeriod": "week",
  "commissionRate": 1
},
"skipPendingOrders": true,
"maxTradeRisk": 0.4,
"reverse": true,
"reduceCorrelations": "by-strategy",
"stopOutRisk": {
  "value": 0.01,
  "startTime": "2020-08-24T00:00:00.000Z"
},
"symbolFilter": {
  "included": [
    "EURUSD"
  ]
},
"newsFilter": {
  "calendarNewsFilter": {
    "priorities": [
      "election"
    ],
    "closePositionTimeGapInMinutes": 10,
    "openPositionPrecedingTimeGapInMinutes": 20,
    "openPositionFollowingTimeGapInMinutes": 20
  }
},
"riskLimits": [
  {
    "type": "daily",
    "applyTo": "balance",
    "maxRisk": 0.05,
    "closePositions": true,
    "startTime": "2020-08-24T00:00:00.000Z"
  }
],
"maxStopLoss": {
  "value": 100,
  "units": "pips"
},
"maxLeverage": 50,
"symbolMapping": [
  {
    "to": "EURUSD",
    "from": "EURUSD.m"
  }
],
"tradeSizeScalingMode": "none"
}' 'https://trading-api-v1.agiliumtrade.agiliumtrade.ai/users/current/configuration/portfolio-strategies/aBcD'