API v2 (current) · MT5 · 28 operations ·
base URL https://cloud.mywebapi.com ·
OpenAPI v2 (JSON) ·
Redoc
Every call needs Authorization: Bearer $TOKEN — an OAuth 2.0 client-credentials token from
https://auth.cplugin.net/connect/token (scope webapi).
$TRADE_PLATFORM_ID is the id of a trade platform registered in Toolbox.
POST /api/v2/MT5/{tradePlatform}/SubscriptionUpdate
Changes a subscription record that already exists on the trade server. The record is
addressed by id, which is mandatory: the subscription link itself is created and
removed by the subscribe and cancel operations, never by this one.
Only the fields present in the body are written; a field left out keeps the value
currently stored. The whole record must still satisfy the rules of the subscription
configuration, so the usual order is: read the record, change the fields needed, send
the result back.
The change is written straight to the subscription database and is not checked against
the management mode of the configuration — the operation is meant for administrative
corrections. The record can only be changed on the trade server that owns it; a request
that reaches another server is refused with the platform error MT_RET_ERR_NOTMAIN.
Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
MT5Subscription (application/json) — Subscription fields to write; id is mandatory.
POST /api/v2/MT5/{tradePlatform}/SubscriptionUpdateBatch
Applies the same rules as the single-record update to every record of the batch. Each
record must carry its id; only the fields present in a record are written.
The response carries one result code per record, in request order. Ok in the
top-level envelope means every record was updated, ErrPartial means only some
were — inspect the array. When a record cannot be loaded or written at all, the call
ends with that error and no array is returned.
Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
MT5Subscription[] (application/json) — Subscription records to write; each needs a mandatory id.
Update subscription records in bulk (plain array form)
POST /api/v2/MT5/{tradePlatform}/SubscriptionUpdateBatchArray
Same operation and same response as the batch form: every record is addressed by its
id and only the fields present in it are written. The two bulk routes are kept
apart because the trade server accepts the records in two shapes; over the API both
take the same JSON array and return the same result codes.
The response carries one result code per record, in request order, with the same
Ok / ErrPartial reading as the batch form.
Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
MT5Subscription[] (application/json) — Subscription records to write; each needs a mandatory id.
POST /api/v2/MT5/{tradePlatform}/SubscriptionDelete/{id}
Removes the subscription record with the given id from the subscription database
of the trade server. The account is not notified and no refund is issued: this is a
database correction, not a cancellation, so nothing is checked against the management
mode of the configuration either.
The record can only be deleted on the trade server that owns it; a request that reaches
another server is refused with MT_RET_ERR_NOTMAIN, an unknown identifier with
MT_RET_ERR_NOTFOUND.
Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
id
path
integer (int64)
yes
Identifier of the subscription record.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
curl -X POST "https://cloud.mywebapi.com/api/v2/MT5/$TRADE_PLATFORM_ID/SubscriptionDelete/$ID" \
-H "Authorization: Bearer $TOKEN"
Delete subscription records in bulk
POST /api/v2/MT5/{tradePlatform}/SubscriptionDeleteBatch
Removes every subscription record with the given identifiers, with the same semantics as
the single-record delete: no notification, no refund, no check against the management
mode of the configuration.
The response carries one result code per identifier, in request order. Ok in the
top-level envelope means every record was removed, ErrPartial means only some
were — inspect the array.
Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
integer (int64)[] (application/json) — Identifiers of the subscription records to delete.
GET /api/v2/MT5/{tradePlatform}/SubscriptionRequest/{login}
Returns every subscription of the account with the given login, including expired ones
that the server still keeps. The result is not paginated. An unknown login is answered
with the platform error rather than with an empty list.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
login
path
integer (int64)
yes
Login of the account.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
GET /api/v2/MT5/{tradePlatform}/SubscriptionRequestByID/{id}
Returns the subscription record with the given identifier. An unknown identifier is
answered with the platform error MT_RET_ERR_NOTFOUND rather than with an empty
record.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
id
path
integer (int64)
yes
Identifier of the subscription record.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
GET /api/v2/MT5/{tradePlatform}/SubscriptionRequestByIDs
Returns the subscription records with the given identifiers. Identifiers that do not
exist are simply absent from the result. For a list longer than fits in the query
string, request the records one by one or by account.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
ids
query
integer (int64)[]
no
Identifiers of the subscription records, repeated as ids=…&ids=… query parameters.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
GET /api/v2/MT5/{tradePlatform}/SubscriptionRequestByLogins
Returns the subscriptions of every account whose login is listed. Logins that do not
exist are simply absent from the result. For a list longer than fits in the query
string, request the accounts one by one or by group.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
logins
query
integer (int64)[]
no
Account logins, repeated as logins=…&logins=… query parameters.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
GET /api/v2/MT5/{tradePlatform}/SubscriptionRequestByGroup/{mask}
Returns the subscriptions of every account that belongs to a group matching the mask.
The mask takes full group names including the path (demo\demoforex), several
names separated by commas, and the wildcards * (any value) and !
(exclude), for example demo*,!demoforex.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
mask
path
string
yes
Group mask: one or more comma-separated names with optional wildcards.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Subscribe an account to a subscription configuration
POST /api/v2/MT5/{tradePlatform}/SubscriptionJoin
Adds the subscription for the account the same way the client terminal does: the
management mode of the configuration is honoured, and when the configuration is paid the
cost is debited from the account balance, creating the matching balance deal. A refused
subscription — disabled configuration, account not allowed, no money — is returned as
the platform error that explains it.
The response carries the subscription record as created and the action record with the
payment, if there was one. The operation is not idempotent: repeating a request that
succeeded but whose answer was lost subscribes the account again and charges it again.
Timeout: 5 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
MT5SubscriptionTarget (application/json) — Account login and subscription configuration identifier.
Subscribe several accounts to subscription configurations
POST /api/v2/MT5/{tradePlatform}/SubscriptionJoinBatch
Performs the same subscription as the single-account operation for every pair of the
batch, with the same checks and the same debiting.
The response carries one result code per pair, in request order, together with the
created subscription records and their action records. Ok in the top-level
envelope means every pair was subscribed, ErrPartial means only some were.
The operation is not idempotent.
Timeout: 5 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
MT5SubscriptionTarget[] (application/json) — Account logins and subscription configuration identifiers.
POST /api/v2/MT5/{tradePlatform}/SubscriptionCancel
Cancels the subscription of the account the way the client terminal does: the management
mode of the configuration is honoured, and when unsubscribing is paid the money is
handled according to the configuration. The cancellation is written as an action and the
subscription record is removed.
The response carries the cancelled subscription record and the action record with the
payment, if there was one. The operation is not idempotent: a repeated request for an
already cancelled subscription fails with the platform error.
Timeout: 5 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
MT5SubscriptionTarget (application/json) — Account login and subscription configuration identifier.
POST /api/v2/MT5/{tradePlatform}/SubscriptionCancelBatch
Cancels every subscription of the batch with the same checks and the same payment
handling as the single-account operation.
The response carries one result code per pair, in request order, together with the
cancelled subscription records and their action records. Ok in the top-level
envelope means every pair was cancelled, ErrPartial means only some were.
The operation is not idempotent.
Timeout: 5 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
MT5SubscriptionTarget[] (application/json) — Account logins and subscription configuration identifiers.
POST /api/v2/MT5/{tradePlatform}/SubscriptionHistoryUpdate
Changes an action record that already exists on the trade server. The record is
addressed by id, which is mandatory; only the fields present in the body are
written, and the remaining ones keep their stored values.
The record can only be changed on the trade server that owns it; a request that reaches
another server is refused with MT_RET_ERR_NOTMAIN, an unknown identifier with
MT_RET_ERR_NOTFOUND.
Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
POST /api/v2/MT5/{tradePlatform}/SubscriptionHistoryUpdateBatch
Applies the same rules as the single-record update to every action of the batch. Each
action must carry its id; only the fields present in an action are written.
The response carries one result code per action, in request order, with the same
Ok / ErrPartial reading as the subscription batch update.
Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
MT5SubscriptionHistory[] (application/json) — Action records to write; each needs a mandatory id.
Update subscription action records in bulk (plain array form)
POST /api/v2/MT5/{tradePlatform}/SubscriptionHistoryUpdateBatchArray
Same operation and same response as the batch form: every action is addressed by its
id and only the fields present in it are written. The two bulk routes are kept
apart because the trade server accepts the records in two shapes; over the API both
take the same JSON array and return the same result codes.
Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
MT5SubscriptionHistory[] (application/json) — Action records to write; each needs a mandatory id.
POST /api/v2/MT5/{tradePlatform}/SubscriptionHistoryDelete/{id}
Removes the action record with the given id from the subscription database of the
trade server. The action is only a journal entry: deleting it does not return money and
does not restore the subscription. The record can only be deleted on the trade server
that owns it; a request that reaches another server is refused with
MT_RET_ERR_NOTMAIN, an unknown identifier with MT_RET_ERR_NOTFOUND.
Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
id
path
integer (int64)
yes
Identifier of the action record.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
curl -X POST "https://cloud.mywebapi.com/api/v2/MT5/$TRADE_PLATFORM_ID/SubscriptionHistoryDelete/$ID" \
-H "Authorization: Bearer $TOKEN"
Delete subscription action records in bulk
POST /api/v2/MT5/{tradePlatform}/SubscriptionHistoryDeleteBatch
Removes every action record with the given identifiers, with the same semantics as the
single-record delete: the journal entries disappear, money and subscriptions stay as
they are. The response carries one result code per identifier, in request order, with
the same Ok / ErrPartial reading as the subscription batch delete.
Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Request body
integer (int64)[] (application/json) — Identifiers of the action records to delete.
GET /api/v2/MT5/{tradePlatform}/SubscriptionHistoryRequest/{login}
Returns every action performed with the subscriptions of the account inside the given
time range: joins, renewals, cancellations and edits, each with the payment it carried.
Both bounds are seconds since 1970-01-01 and are inclusive; the range is required.
The result is not paginated.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
login
path
integer (int64)
yes
Login of the account.
from
query
integer (int64)
no
Start of the period, in seconds since 1970-01-01.
to
query
integer (int64)
no
End of the period, in seconds since 1970-01-01.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
GET /api/v2/MT5/{tradePlatform}/SubscriptionHistoryRequestByID/{id}
Returns the action record with the given identifier. An unknown identifier is answered
with the platform error MT_RET_ERR_NOTFOUND rather than with an empty record.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
id
path
integer (int64)
yes
Identifier of the action record.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
GET /api/v2/MT5/{tradePlatform}/SubscriptionHistoryRequestByIDs
Returns the action records with the given identifiers. Identifiers that do not exist are
simply absent from the result.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
ids
query
integer (int64)[]
no
Identifiers of the action records, repeated as ids=…&ids=… query parameters.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Subscription actions of several accounts for a period
GET /api/v2/MT5/{tradePlatform}/SubscriptionHistoryRequestByLogins
Returns the actions performed with the subscriptions of every listed account inside the
given time range. Both bounds are seconds since 1970-01-01 and are inclusive; the range
is required. The result is not paginated.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
logins
query
integer (int64)[]
no
Account logins, repeated as logins=…&logins=… query parameters.
from
query
integer (int64)
no
Start of the period, in seconds since 1970-01-01.
to
query
integer (int64)
no
End of the period, in seconds since 1970-01-01.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Subscription actions of the accounts of a group for a period
GET /api/v2/MT5/{tradePlatform}/SubscriptionHistoryRequestByGroup/{mask}
Returns the actions performed with the subscriptions of every account that belongs to a
group matching the mask, inside the given time range. The mask takes full group names
including the path, several names separated by commas, and the wildcards * (any
value) and ! (exclude). Both bounds are seconds since 1970-01-01 and are
inclusive; the range is required.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
mask
path
string
yes
Group mask: one or more comma-separated names with optional wildcards.
from
query
integer (int64)
no
Start of the period, in seconds since 1970-01-01.
to
query
integer (int64)
no
End of the period, in seconds since 1970-01-01.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Subscription configuration by name, from the streamed copy
GET /api/v2/MT5/{tradePlatform}/SubscriptionCfgGet/{name}
Returns the subscription configuration with the given name from the configuration copy
that the trade server streams to this connection. The call does not reach the server, so
it answers immediately and may lag behind the server by the time of the last update.
The copy exists only when the configuration stream is enabled for the connection;
otherwise the call fails with the platform error. Use the request form to read the
configuration directly from the server.
Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
name
path
string
yes
Name of the subscription configuration.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Subscription configuration by identifier, from the streamed copy
GET /api/v2/MT5/{tradePlatform}/SubscriptionCfgGetByID/{id}
Same as the lookup by name, but the configuration is addressed by its identifier. The
call reads the copy streamed to this connection and does not reach the server; the copy
exists only when the configuration stream is enabled for the connection.
Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
id
path
integer (int64)
yes
Identifier of the subscription configuration.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Subscription configuration by name, from the server
GET /api/v2/MT5/{tradePlatform}/SubscriptionCfgRequest/{name}
Requests the subscription configuration with the given name directly from the trade
server, so the answer is current at the moment of the call. An unknown name is answered
with the platform error rather than with an empty configuration.
The configuration is returned with its whole content: the countries, groups, trading
instruments and news categories it covers, not only its general settings.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
name
path
string
yes
Name of the subscription configuration.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Subscription configuration by identifier, from the server
GET /api/v2/MT5/{tradePlatform}/SubscriptionCfgRequestByID/{id}
Same as the request by name, but the configuration is addressed by its identifier. The
answer is read from the trade server at the moment of the call and carries the whole
content of the configuration.
Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.
Parameters
Name
In
Type
Required
Description
tradePlatform
path
string (uuid)
yes
Trade platform identifier (GUID).
id
path
integer (int64)
yes
Identifier of the subscription configuration.
X-Request-Timeout
header
number (double)
no
How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.
Subscription state. One of: Active, Suspended, Canceled. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
Start of the subscription, in seconds since 1970-01-01.
timeRenewal
integer (int64), nullable
Time of the last subscription renewal, in seconds since 1970-01-01.
timeExpire
integer (int64), nullable
End of the subscription, in seconds since 1970-01-01.
BooleanApiResponse
Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.
v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.
MT5ResultListApiResponse
Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.
v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.
MT5SubscriptionListApiResponse
Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.
v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.
MT5SubscriptionApiResponse
Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.
v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.
MT5SubscriptionTarget
An account and a subscription configuration to act on.
Property
Type
Description
login
integer (int64)
Login of the account.
subscription
integer (int64)
Identifier of the subscription configuration.
MT5SubscriptionActionResultApiResponse
Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.
v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.
MT5SubscriptionBatchResultApiResponse
Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.
v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.
MT5SubscriptionHistory
An action performed with a subscription of a trading account.
Property
Type
Description
id
integer (int64), nullable
Identifier of the action record. Required when an existing action is updated.
login
integer (int64), nullable
Login of the account the subscription belongs to.
subscription
integer (int64), nullable
Identifier of the subscription configuration the action was performed with.
record
integer (int64), nullable
Identifier of the subscription record the action was performed on.
Action performed with the subscription. One of: Subscribe, Renewal, Suspend, Cancel, Deleted. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
time
integer (int64), nullable
Time of the action, in seconds since 1970-01-01.
amount
number (double), nullable
Amount charged or returned by the action.
amountDigits
integer (int32), nullable
Number of decimal places in amount.
amountDeal
integer (int64), nullable
Ticket of the balance deal through which the payment was made; zero when there was no payment.
MT5SubscriptionHistoryListApiResponse
Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.
v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.
MT5SubscriptionHistoryApiResponse
Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.
v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.
MT5ConSubscriptionApiResponse
Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.
v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.
MT5SubscriptionStatus
State of a subscription.
Values: Active, Suspended, Canceled
MT5SubscriptionFlags
Additional properties of a subscription. Flags: names of the set bits joined by ", " ("FreePeriod"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: FreePeriod = 0x1.
ApiError
v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
Property
Type
Description
code
WebApiErrorCode
Stable transport-level error code.
managerCode
ResultCode
Raw MT4/MT5 manager result code, when the error came from the trading platform; otherwise null.
message
string, nullable
Human-readable error description.
ApiMeta
Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.
Property
Type
Description
activityId
string, nullable
W3C trace id of the request. Quote it when you contact support: it finds this exact call in the server logs.
paging
PagingMeta
Pagination info; present only on list responses, omitted otherwise.
Unique configuration identifier assigned by the server.
parentId
integer (int64), nullable
Identifier of the directory the configuration is placed in; zero means the root directory.
dependsId
integer (int64), nullable
Identifier of the configuration this one depends on; zero means no dependency.
name
string, nullable
Configuration name.
type
MT5SubscriptionType
Subscription type. One of: Subscription, Folder. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
image
integer (int32), nullable
Logo shown for the subscription.
description
string, nullable
Description of the subscription.
urlDescription
string, nullable
Link to an additional description of the subscription.
urlAgreement
string, nullable
Link to the subscription agreement.
controlMode
MT5SubscriptionControlMode
Actions the client terminals are allowed to perform with the subscription. One of: Full, Unsubscribe, View, Hidden. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
periodMode
MT5SubscriptionPeriod
Subscription period. One of: Once, Daily, Weekly, Monthly, Quarterly, Annual, Custom. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
periodCustom
integer (int32), nullable
Custom subscription period in days, used when periodMode selects a custom period.
periodFreeMode
MT5SubscriptionFreePeriod
Trial (free) period. One of: None, Day, Week, Month, Quarter, Year, Custom. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
periodFreeCustom
integer (int32), nullable
Custom trial period value, used when periodFreeMode selects a custom trial period.
flags
MT5ConSubscriptionFlags
Additional subscription property flags.
price
number (double), nullable
Subscription price for non-professional traders.
pricePro
number (double), nullable
Subscription price for professional traders.
priceCost
number (double), nullable
Real cost of the subscription, the amount the client is actually charged.