Skip to content

Register account

About

Registers user if not yet registered and creates a self-hosted MT account.

POST /accounts/register

For more information see swagger documentation

Body

Name Type Required Description
name string Yes username
email string Yes email to login or register if the account is not already in the system
login string Yes Trading account login. Only digits are allowed
password string Yes user password
slippage number Default trade slippage in points. Should be greater or equal to zero. If not specified, system internal setting will be used which we believe is reasonable for most cases
brokerTimezone string Yes Broker timezone from Time Zone Database
brokerDSTSwitchTimezone string Yes Timezone according to which daylight saving time switch happens on broker server

Response

  • 200 - Account successfully registered.
Name Type Required Description
token string Yes Trading account token
auth-token string Yes Authorization token value
accountId string Yes Trading account id
  • 400 - Validation failed. Response schema: Error
  • 401 - Authorization failed. Response schema: Error
  • 403 - user is not permitted to access the system. Response schema: Error

Examples

Example request:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
  "name": "testAccount",
  "email": "alex.0.at@agiliumlabs.com",
  "login": "50194988",
  "password": "password",
  "brokerTimezone": "EET",
  "brokerDSTSwitchTimezone": "EET"
}' 'https://mt-provisioning-api-v1.project-stock.agiliumtrade.ai/accounts/register'

Example response:

{
  "auth-token": "token",
  "token": "dBKP6sTxWLJKmAq8mSBRsEqww7OnRDbht0t1RRPvdhgZYbTGrsxy9SEI721EihUR",
  "accountId": "97b05631-d27b-4e2a-b5ee-e30818bd13df"
}