Skip to content

Update account#

About#

Updates account configuration

PUT /users/current/configuration/accounts/:accountId

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
accountId string Yes account id

Body#

Account payload schema: UpdatedAccount

Response#

Responses:

  • 204 - Account saved successfully.
  • 400 - Account 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": "string",
"connectionId": "string",
"reservedMarginFraction": 0,
"phoneNumbers": [
  "string"
],
"minTradeAmount": 0,
"closeOnly": "by-position",
"stopOutRisk": {
  "value": 0,
  "startTime": "string"
},
"riskLimits": [
  {
    "type": "daily",
    "applyTo": "balance",
    "maxRisk": 0,
    "closePositions": true,
    "startTime": "string"
  }
],
"maxLeverage": 0,
"subscriptions": [
  {
    "strategyId": "string",
    "multiplier": 0,
    "skipPendingOrders": true,
    "closeOnly": "by-strategy",
    "maxTradeRisk": 0,
    "reverse": true,
    "reduceCorrelations": "by-strategy",
    "stopOutRisk": {
      "value": 0,
      "startTime": "string"
    },
    "symbolFilter": {
      "included": [
        "string"
      ],
      "excluded": [
        "string"
      ]
    },
    "newsFilter": {
      "breakingNewsFilter": {
        "priorities": [
          "high"
        ],
        "closePositionTimeGapInMinutes": 0,
        "openPositionFollowingTimeGapInMinutes": 0
      },
      "calendarNewsFilter": {
        "priorities": [
          "election"
        ],
        "closePositionTimeGapInMinutes": 0,
        "openPositionPrecedingTimeGapInMinutes": 0,
        "openPositionFollowingTimeGapInMinutes": 0
      }
    },
    "riskLimits": [
      {
        "type": "daily",
        "applyTo": "balance",
        "maxRisk": 0,
        "closePositions": true,
        "startTime": "string"
      }
    ],
    "maxStopLoss": {
      "value": 0,
      "units": "pips"
    },
    "maxLeverage": 0,
    "symbolMapping": [
      {
        "to": "string",
        "from": "string"
      }
    ],
    "tradeSizeScalingMode": "none"
  }
]
}' 'https://trading-api-v1.agiliumtrade.agiliumtrade.ai/users/current/configuration/accounts/865d3a4d-3803-486d-bdf3-a85679d9fad2'