Skip to content

Get strategies#

About#

Returns provider strategies the user has configured

GET /users/current/configuration/strategies

For more information see Swagger documentation

Headers#

Name Type Required Description
auth-token string Yes authorization token. See Authentication & authorization
api-version number request version, allowed values are 1 and 2, default is 1

Query parameters#

Name Type Required Description
includeRemoved boolean flag instructing to include removed strategies in results, default: false
limit integer pagination limit, default: 1000, min: 1, max: 1000
offset integer pagination offset, default: 0, min: 0

Response#

Responses:

  • 200 - Strategies returned successfully. Response schema: Array<Strategy> for request v1 and StrategyList for request v2.
  • 401 - Authorization failed. Response schema: Error

Examples#

Example request:

curl -X GET --header 'Accept: application/json' --header 'auth-token: token' 'https://copyfactory-api-v1.new-york.agiliumtrade.ai/users/current/configuration/strategies'

Example response for request v1:

[
  {
    "_id": "AeRF",
    "name": "Test strategy",
    "description": "Some useful description about your strategy",
    "skipPendingOrders": true,
    "accountId": "105646d8-8c97-4d4d-9b74-413bd66cd4ed",
    "commissionScheme": {
      "type": "flat-fee",
      "billingPeriod": "week",
      "commissionRate": 1
    },
    "platformCommissionRate": 1,
    "maxTradeRisk": 0.4,
    "reverse": true,
    "reduceCorrelations": "by-strategy",
    "stopOutRisk": {
      "absoluteValue": 0.05,
      "relativeValue": 0.4,
      "startTime": "2020-08-24T00:00:00.000Z"
    },
    "symbolFilter": {
      "included": [
        "EURUSD"
      ]
    },
    "newsFilter": {
      "calendarNewsFilter": {
        "priorities": [
          "election"
        ],
        "closePositionTimeGapInMinutes": 10,
        "openPositionPrecedingTimeGapInMinutes": 20,
        "openPositionFollowingTimeGapInMinutes": 20
      }
    },
    "riskLimits": [
      {
        "type": "day",
        "applyTo": "balance-difference",
        "maxAbsoluteRisk": 0.05,
        "maxRelativeRisk": 0.4,
        "closePositions": true,
        "startTime": "2020-08-24T00:00:00.000Z"
      }
    ],
    "maxStopLoss": {
      "value": 150,
      "units": "pips"
    },
    "maxLeverage": 50,
    "symbolMapping": [
      {
        "to": "EURUSD",
        "from": "EURUSD.m"
      }
    ],
    "tradeSizeScaling": {
      "mode": "none"
    },
    "magicFilter": {
      "included": [
        "1000-2000"
      ],
      "excluded": [
        "1250-1500"
      ]
    },
    "timeSettings": {
      "lifetimeInHours": 10,
      "openingIntervalInMinutes": 10
    }
  }
]

Example response for request v2:

{
  "count": 1,
  "items": [
    {
      "_id": "AeRF",
      "name": "Test strategy",
      "description": "Some useful description about your strategy",
      "skipPendingOrders": true,
      "accountId": "105646d8-8c97-4d4d-9b74-413bd66cd4ed",
      "commissionScheme": {
        "type": "flat-fee",
        "billingPeriod": "week",
        "commissionRate": 1
      },
      "platformCommissionRate": 1,
      "maxTradeRisk": 0.4,
      "reverse": true,
      "reduceCorrelations": "by-strategy",
      "stopOutRisk": {
        "absoluteValue": 0.05,
        "relativeValue": 0.4,
        "startTime": "2020-08-24T00:00:00.000Z"
      },
      "symbolFilter": {
        "included": [
          "EURUSD"
        ]
      },
      "newsFilter": {
        "calendarNewsFilter": {
          "priorities": [
            "election"
          ],
          "closePositionTimeGapInMinutes": 10,
          "openPositionPrecedingTimeGapInMinutes": 20,
          "openPositionFollowingTimeGapInMinutes": 20
        }
      },
      "riskLimits": [
        {
          "type": "day",
          "applyTo": "balance-difference",
          "maxAbsoluteRisk": 0.05,
          "maxRelativeRisk": 0.4,
          "closePositions": true,
          "startTime": "2020-08-24T00:00:00.000Z"
        }
      ],
      "maxStopLoss": {
        "value": 150,
        "units": "pips"
      },
      "maxLeverage": 50,
      "symbolMapping": [
        {
          "to": "EURUSD",
          "from": "EURUSD.m"
        }
      ],
      "tradeSizeScaling": {
        "mode": "none"
      },
      "magicFilter": {
        "included": [
          "1000-2000"
        ]
      },
      "drawdownFilter": {
        "maxDrawdown": 0.4,
        "action": "include"
      },
      "timeSettings": {
        "lifetimeInHours": 10,
        "openingIntervalInMinutes": 10
      }
    }
  ]
}