Account presets

Account preset - a mechanism for defining the settings that can be reused for different accounts in the future. The most convenient way to create the preset which will be used for future user creation is via the BackOffice (BackOffice -> Users -> Account presets list). You can request all existing presets using the GET method or create a new one via the POST.

Get a list of account presets

GET/accountPresets

Returns all available account presets with their IDs. Presets can be filtered by their currency or name, this info should be added to the query.

Query

Name
Type
Description

presetCurrency

string

Allows filtering presets by currency ID

presetName

string

Allows filtering presets by their name

CURL

curl -X GET "https://sandbox.traderevolution.com:8443/proftrading/rest/accountPresets?presetCurrency=4803&presetName=demo" -H "accept: application/json" -H "Authorization: Bearer eyItMjA5ODU2ODY2MSI6LTIwOTg1Njg2NjEsIjE0NDQ5Njc3MT...ckueCWrthA1RmhoDA772jww"

Since both filters are applied, in the response we should receive all account presets with Currency = 4803 (ID for CAD) and Name = demo.

Response

[
  {
    "presetId": 1055450,
    "presetName": "demo"
  }
]

You can create an empty request, in this case, it will contain all presets currently available on this server:

Response

Create account preset

POST /accountPresets

This method is used for creating a new account preset. Various parameters can be configured here, they will subsequently be applied to the newly created accounts.

Request

Response

The response will contain the unique ID of the newly created account preset. This ID may later be used for creating a new user/account (see corresponding article).

Last updated