Skip to content

Get accounts#

About#

Returns accounts the user have configured

GET /users/current/configuration/accounts

For more information see Swagger documentation

Headers#

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

Response#

Responses:

  • 200 - Accounts returned successfully. Response schema: Array<Account>
  • 401 - Authorization failed. 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'

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"
      }
    ]
  }
]