Create a master or investment account using the existing MT account
Create a master or investment account on the B2COPY investment platform using a client’s existing MT account with this API method
Use the method described below to create a master or investment account for a client from their existing MT account.
POST [host]/api/v2/b2copy/accounts/create
Request
Headers
Authorization: Bearer <access_token>
To get the access token, use the method to authorize in the Back Office.
Body
In the request body, specify the following parameters:
clientID
integer
Yes
The identifier of a client for whom you want to create a master or investment account.
investmentPlatformId
integer
Yes
The identifier of the investment platform instance.
- If only one MT server is connected to your B2COPY investment platform, specify 1. 
- If you have more than one MT server connected to your B2COPY investment platform, contact the Support team for assistance. 
accountNumber
string
Yes
The MT login (number) of a client account that exists on MT. This account will be registered as a master or investment account on the B2COPY investment platform.
productCurrencyId
integer
Yes
The identifier of a product currency. Contact the Support team for assistance.
isMaster
integer
Yes
Specify 1 to create a master account; and 0 to create an investment account.
accountName
string
No
The name assigned to a master or investment account.
accountDescription
string
No
The description of a trading strategy used on the account.
Request example
curl --location --request GET 'https://host.name/api/v2/b2copy/accounts/create' \
--header 'Authorization: Bearer <accesss_token>' \
--data-raw '{
    "clientId": 4406,
    "investmentPlatformId": 1,
    "accountNumber': "2121882154",
    "productCurrencyId": 10,
    "isMaster": 0,
    "accountName": "MAM investor",
    "accountDescription": "The trading strategy applied on the account"
}'Response
The response includes the object providing information about the created master or investment account.
Response example
{
  "is_master": false,
  "show_in_client_ui", true,
  "status": true,
  "id": 12574,
  "account_description": "The trading strategy applied on the account",
  "account_name": "MAM investor",
  "type": 8,
  "show_in_leaderboard": false,
  "show_opened_positions": false,
  "show_closed_positions": false,
  "hide_time_positions": false,
  "show_ivestor_opened_positions": false,
  "show_ivestor_closed_positions": false,
  "hide_investor_time_positions": false,
  "active_since": "2024-04-01T15:06:41.000000Z",
  "updated_at": "2024-04-01T15:06:41.000000Z",
  "created_at": "2024-04-01T15:06:41.000000Z"
}Last updated
Was this helpful?

