Skip to content

Get account by id#

About#

Returns CopyFactory account the user have configured by account id

GET /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 CopyFactory account id

Response#

Responses:

  • 200 - Account returned successfully. Response schema: Account
  • 401 - Authorization failed. Response schema: Error
  • 404 - Account not found. Response schema: Error

Examples#

Example request:

curl -X GET --header 'Accept: application/json' --header 'auth-token: token' 'https://trading-api-v1.agiliumtrade.agiliumtrade.ai/users/current/configuration/accounts/VS9FKAYJIUr7cX8pAcPZVfCV5frvQX0OLYTuYhdLQImqyOyVobzf656Twmp0jdUS'

Example response:

{
  "_id": "VS9FKAYJIUr7cX8pAcPZVfCV5frvQX0OLYTuYhdLQImqyOyVobzf656Twmp0jdUS",
  "name": "Demo account",
  "connectionId": "105646d8-8c97-4d4d-9b74-413bd66cd4ed",
  "reservedMarginFraction": 1.5,
  "minTradeAmount": 20,
  "closeOnly": "by-position",
  "stopOutRisk": {
    "value": 0.01,
    "startTime": "2020-08-24T00:00:00.000Z"
  },
  "riskLimits": [
    {
      "type": "daily",
      "applyTo": "balance",
      "maxRisk": 0.01,
      "closePositions": true,
      "startTime": "2020-08-24T00:00:00.000Z"
    }
  ],
  "maxLeverage": 50,
  "subscriptions": [
    {
      "strategyId": "SMKn",
      "multiplier": 1,
      "skipPendingOrders": true,
      "closeOnly": "by-strategy",
      "maxTradeRisk": 0.01,
      "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.01,
          "closePositions": true,
          "startTime": "2020-08-24T00:00:00.000Z"
        }
      ],
      "maxStopLoss": {
        "value": 100,
        "units": "pips"
      },
      "maxLeverage": 0,
      "symbolMapping": [
        {
          "to": "EURUSD",
          "from": "EURUSD.m"
        }
      ],
      "tradeSizeScalingMode": "none"
    }
  ]
}