Skip to content

Create MetaTrader 5 demo account

About

Creates MetaTrader 5 demo account

Note: Not all brokers allow creating demo accounts this way. You can create a demo account for the broker which allows creating demo accounts via MT terminal. When creating a demo account please supply correct email and account type values. You can find available account type values in MT terminal. Please make sure the rate at which you create demo accounts is reasonably low, since your broker can rate limit the requests which will cause the API to return error. Your broker can also limit the number of demo accounts per email or require you to fill extra data about account owner.

POST /users/current/provisioning-profiles/:profileId/mt5-demo-accounts

For more information see swagger documentation

Headers

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

Path parameters

Name Type Required Description
profileId string Yes Id of the provisioning profile that will be used as the basis for creating this account

Body

Name Type Required Description
address string Account holder's address
balance number Yes Account balance
city string Account holder's city
country string Account holder's country
email string Yes Account holder's email
languageId number Language id (default is 1)
leverage number Yes Account leverage
name string Account holder's name
phone string Account holder's phone
serverName string Yes Server name
state string Account holder's state
zip string Zip address

Response

  • 201 - Demo account created successfully. Response schema: MetatraderDemoAccount
  • 400 - Validation failed. Response schema: Error
  • 401 - Authorization failed. Response schema: Error
  • 403 - user is not permitted to create account. Response schema: Error
  • 404 - Provisioning profile with specified id not found. Response schema: Error

Examples

Example request:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'auth-token: token' -d '{
  "balance": 1000,
  "email": "example@examle.com",
  "leverage": 10,
  "serverName": "ICMarketsSC-Demo"
}' 'https://mt-provisioning-api-v1.agiliumtrade.agiliumtrade.ai/users/current/provisioning-profiles/profileId/mt5-demo-accounts'

Example response:

{
  "login": "86053193",
  "password": "2y8kpft",
  "investorPassword": "dc56esco",
  "serverName": "ICMarketsSC-Demo"
}