API v2 (current) · MT5 · 42 operations ·
base URL https://cloud.mywebapi.com ·
OpenAPI v2 (JSON) ·
Redoc
Every call needs Authorization: Bearer $TOKEN — an OAuth 2.0 client-credentials token (scope
webapi). The token server belongs to the environment: for the Sandbox call
https://pre.mywebapi.com and take the token from
https://pre.auth.cplugin.net/connect/token; for Production take it from
https://auth.cplugin.net/connect/token. Clients and tokens of the two are separate — a token
from one answers 401 on the other.
$TRADE_PLATFORM_ID is the id of a trade platform registered in Toolbox.
A failed operation is also answered with HTTP 200: check error before using
data. Access and transport failures use HTTP codes — see
Errors.
Writes the changed client record back to the server database. Send the whole record, not only
the fields that changed: a field left out is written as empty, so read the client first, change
what is needed and send the result. The person name must be filled in, otherwise the record is
refused. A client can only be changed from the server that created it; a record that does not
exist is answered with a platform error. The response carries the record as stored by the server.
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
MT5Client (application/json) — Complete client record, including its identifier.
Adds the listed clients to the server database in one call — the same rules and the same
validation as the single add. Every record receives the identifier the server assigned to it,
which is returned per entry together with its result code. A partial failure answers one entry
per client, so inspect each result instead of trusting the batch as a whole.
The operation is not idempotent — a repeat after an unclear outcome creates a second record.
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
MT5Client[] (application/json) — Client records to create.
POST /api/v2/MT5/{tradePlatform}/ClientAddBatchArray
Same operation as ClientAddBatch with the same rules: the batch is validated per record and
one entry per client is returned, together with the identifier the server assigned.
The operation is not idempotent — a repeat after an unclear outcome creates a second record.
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
MT5Client[] (application/json) — Client records to create.
POST /api/v2/MT5/{tradePlatform}/ClientUpdateBatch
Writes several changed client records back in one call. As with the single update, every record
must be complete, not only the changed fields. One entry per client is returned, so a partial
failure names the clients that were refused.
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
MT5Client[] (application/json) — Complete client records, each with its identifier.
POST /api/v2/MT5/{tradePlatform}/ClientUpdateBatchArray
Same operation as ClientUpdateBatch with the same rules: every record must be complete and
one entry per client 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
MT5Client[] (application/json) — Complete client records, each with its identifier.
POST /api/v2/MT5/{tradePlatform}/ClientDeleteBatch
Removes several client records from the server database in one call. The operation is not
reversible. Accounts and documents attached to the clients are not deleted by this call.
One entry per identifier is returned, so a partial failure names the records that survived.
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 clients to delete.
GET /api/v2/MT5/{tradePlatform}/ClientRequestByGroup
Returns the clients whose preferred group matches the mask, and also those without a preferred
group when one of their bound accounts belongs to a matching group. The mask takes one group,
several comma-separated groups or wildcards: * matches any value and ! excludes,
for example demo*,!demoforex. Reading changes nothing.
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).
groups
query
string
no
Group mask, several groups or a negation list.
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}/ClientRequestHistory/{clientId}
Returns the versions of the client record for the requested time window — the record as it was
after every change. Both bounds are optional: without them the whole history is read. When an
author is given, only the changes made by that manager account are returned. Reading changes
nothing.
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).
clientId
path
integer (int64)
yes
Client identifier.
author
query
integer (int64)
no
Login of the manager account that made the changes; omitted means any author.
from
query
string (date-time)
no
Window start; omitted means the beginning of the history.
to
query
string (date-time)
no
Window end; omitted means no upper bound.
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.
POST /api/v2/MT5/{tradePlatform}/ClientUserAddBatch/{clientId}
Binds the listed accounts to the client record in one call. The accounts must already exist —
the call does not create them — and the account data is not copied into the client. One entry
per login is returned, so a partial failure names the accounts that stayed unbound.
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).
clientId
path
integer (int64)
yes
Client identifier.
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) — Trade account logins to bind.
POST /api/v2/MT5/{tradePlatform}/ClientUserDelete/{clientId}/{login}
Removes the link between the account and the client record. The account itself is not deleted
and stays on the server. The response carries the platform result code of the operation.
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).
clientId
path
integer (int64)
yes
Client identifier.
login
path
integer (int64)
yes
Trade account login to unbind.
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/ClientUserDelete/$CLIENT_ID/$LOGIN" \
-H "Authorization: Bearer $TOKEN"
Unbind trading accounts from a client in bulk
POST /api/v2/MT5/{tradePlatform}/ClientUserDeleteBatch/{clientId}
Removes the links between the listed accounts and the client record in one call. The accounts
themselves are not deleted. One entry per login is returned, so a partial failure names the
accounts that stayed bound.
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).
clientId
path
integer (int64)
yes
Client identifier.
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) — Trade account logins to unbind.
GET /api/v2/MT5/{tradePlatform}/ClientUserRequest/{clientId}
Returns the logins of every trading account bound to the client record. Reading changes nothing;
a client without bound accounts answers an empty list.
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).
clientId
path
integer (int64)
yes
Client identifier.
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.
Stores a document in the client record and returns it as the server saved it, including the
identifier it was assigned. The client must be identified; otherwise the record is refused.
A document can only be added from the server that holds the client. Files are attached to the
document separately, by the attachment routes.
The operation is not idempotent — a repeat after an unclear outcome creates a second record.
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
MT5Document (application/json) — Document record to store.
Stores the listed documents in one call with the same rules as the single add. One entry per
document is returned with the identifier the server assigned, so a partial failure names the
documents that were refused.
The operation is not idempotent — a repeat after an unclear outcome creates a second record.
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
MT5Document[] (application/json) — Document records to store.
POST /api/v2/MT5/{tradePlatform}/DocumentAddBatchArray
Same operation as DocumentAddBatch with the same rules: one entry per document is
returned together with the identifier the server assigned.
The operation is not idempotent — a repeat after an unclear outcome creates a second record.
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
MT5Document[] (application/json) — Document records to store.
Writes the changed document back to the client record. Send the whole document, not only the
fields that changed — read it first and change what is needed. A document can only be changed
from the server that holds its client. The response carries the document as stored.
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
MT5Document (application/json) — Complete document record, including its identifier.
POST /api/v2/MT5/{tradePlatform}/DocumentUpdateBatch
Writes several changed documents back in one call with the same rules as the single change:
every record must be complete. One entry per document 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
MT5Document[] (application/json) — Complete document records, each with its identifier.
POST /api/v2/MT5/{tradePlatform}/DocumentUpdateBatchArray
Same operation as DocumentUpdateBatch with the same rules: every record must be complete
and one entry per document 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
MT5Document[] (application/json) — Complete document records, each with its identifier.
POST /api/v2/MT5/{tradePlatform}/DocumentDelete/{documentId}
Removes the document from the client record. The operation is not reversible; the files attached
to the document are not deleted by this call. The response carries the platform result code.
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).
documentId
path
integer (int64)
yes
Document identifier.
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/DocumentDelete/$DOCUMENT_ID" \
-H "Authorization: Bearer $TOKEN"
Delete documents in bulk
POST /api/v2/MT5/{tradePlatform}/DocumentDeleteBatch
Removes several documents in one call. The operation is not reversible and does not delete the
attached files. One entry per identifier is returned, so a partial failure names the documents
that survived.
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 documents to delete.
GET /api/v2/MT5/{tradePlatform}/DocumentRequest/{documentId}
Fetches the document of the given identifier together with the list of its attached files
(identifier, name and size — not the content). Reading changes nothing. An identifier that does
not exist is answered with a platform error rather than 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).
documentId
path
integer (int64)
yes
Document identifier.
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}/DocumentRequestByClient/{clientId}
Returns every document stored in the client record, each with the list of its attached files
(identifier, name and size — not the content). Reading changes nothing; a client without
documents answers 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).
clientId
path
integer (int64)
yes
Client identifier.
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}/DocumentRequestHistory/{documentId}
Returns the versions of the document for the requested time window — the record as it was after
every change. Both bounds are optional: without them the whole history is read. When an author is
given, only the changes made by that manager account are returned. Reading changes nothing.
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).
documentId
path
integer (int64)
yes
Document identifier.
author
query
integer (int64)
no
Login of the manager account that made the changes; omitted means any author.
from
query
string (date-time)
no
Window start; omitted means the beginning of the history.
to
query
string (date-time)
no
Window end; omitted means no upper bound.
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.
Stores a comment and returns it as the server saved it, including the identifier it was assigned.
The client must be identified; a document identifier is optional and, when given, makes the
comment belong to that document instead of the client. A comment can only be added from the
server that holds the client. Files are attached to the comment separately.
The operation is not idempotent — a repeat after an unclear outcome creates a second record.
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
MT5Comment (application/json) — Comment record to store.
Stores the listed comments in one call with the same rules as the single add. One entry per
comment is returned with the identifier the server assigned.
The operation is not idempotent — a repeat after an unclear outcome creates a second record.
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
MT5Comment[] (application/json) — Comment records to store.
POST /api/v2/MT5/{tradePlatform}/CommentAddBatchArray
Same operation as CommentAddBatch with the same rules: one entry per comment is returned
together with the identifier the server assigned.
The operation is not idempotent — a repeat after an unclear outcome creates a second record.
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
MT5Comment[] (application/json) — Comment records to store.
Writes the changed comment back. Send the whole comment, not only the fields that changed — read
it first and change what is needed. The client and, for a document comment, the document must be
identified. A comment can only be changed from the server that holds its client.
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
MT5Comment (application/json) — Complete comment record, including its identifier.
POST /api/v2/MT5/{tradePlatform}/CommentUpdateBatch
Writes several changed comments back in one call with the same rules as the single change:
every record must be complete. One entry per comment 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
MT5Comment[] (application/json) — Complete comment records, each with its identifier.
POST /api/v2/MT5/{tradePlatform}/CommentUpdateBatchArray
Same operation as CommentUpdateBatch with the same rules: every record must be complete
and one entry per comment 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
MT5Comment[] (application/json) — Complete comment records, each with its identifier.
POST /api/v2/MT5/{tradePlatform}/CommentDelete/{commentId}
Removes the comment from the client or document it belongs to. The operation is not reversible and
does not delete the files attached to the comment. The response carries the platform result code.
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).
commentId
path
integer (int64)
yes
Comment identifier.
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/CommentDelete/$COMMENT_ID" \
-H "Authorization: Bearer $TOKEN"
Delete comments in bulk
POST /api/v2/MT5/{tradePlatform}/CommentDeleteBatch
Removes several comments in one call. The operation is not reversible and does not delete the
attached files. One entry per identifier is returned, so a partial failure names the comments
that survived.
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 comments to delete.
GET /api/v2/MT5/{tradePlatform}/CommentRequest/{commentId}
Fetches the comment of the given identifier together with the list of its attached files
(identifier, name and size — not the content). Reading changes nothing. An identifier that does
not exist is answered with a platform error rather than 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).
commentId
path
integer (int64)
yes
Comment identifier.
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}/CommentRequestByClient/{clientId}
Returns a slice of the comments stored on the client record, in the order the server keeps them.
The slice is set by position (zero-based index of the first comment) and total
(number of comments to return), so a long thread is read page by page. Reading changes nothing.
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).
clientId
path
integer (int64)
yes
Client identifier.
position
query
integer (int32)
no
Zero-based index of the first comment to return; 0 means the beginning.
total
query
integer (int32)
no
Number of comments to return; 0 means all of them.
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}/CommentRequestByDocument/{documentId}
Returns a slice of the comments stored on the document, in the order the server keeps them. The
slice is set by position (zero-based index of the first comment) and total (number
of comments to return), so a long thread is read page by page. Reading changes nothing.
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).
documentId
path
integer (int64)
yes
Document identifier.
position
query
integer (int32)
no
Zero-based index of the first comment to return; 0 means the beginning.
total
query
integer (int32)
no
Number of comments to return; 0 means all of them.
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.
Store a file and link it to a document or a comment
POST /api/v2/MT5/{tradePlatform}/AttachmentAdd
Sends the file to the server, which stores it and assigns an identifier, and then links it to the
document named by documentID or to the comment named by commentID. At most one of the
two may be given; with neither, the file is stored on the client record without a link.
The client must be identified, as the file belongs to it.
The file is stored before the link is written. When the link fails, the file stays on the server
without an owner and cannot be removed through the API — check the document or comment identifier
before sending large files.
The operation is not idempotent — a repeat after an unclear outcome creates a second record.
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
MT5Attachment (application/json) — File to store, with its owner and the link target.
POST /api/v2/MT5/{tradePlatform}/AttachmentAddBatch
Stores the listed files in one call and links each one to the document or comment named in its own
entry. Every entry follows the rules of the single store: one owner client, at most one link
target, and the file content in the body. One entry per file is returned with the identifier the
server assigned; a failure of the link is reported in the entry of that file.
The operation is not idempotent — a repeat after an unclear outcome creates a second record.
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
MT5Attachment[] (application/json) — Files to store, each with its owner and link target.
POST /api/v2/MT5/{tradePlatform}/AttachmentAddBatchArray
Same operation as AttachmentAddBatch with the same rules: each file carries its own owner
and link target, and one entry per file is returned with the identifier the server assigned.
The operation is not idempotent — a repeat after an unclear outcome creates a second record.
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
MT5Attachment[] (application/json) — Files to store, each with its owner and link target.
Returns the listed files together with their content. An identifier that does not exist is
answered with a platform error. Reading changes nothing.
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).
ids
query
integer (int64)[]
no
Attachment identifiers; repeat the parameter for several files.
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.
Adds a client — the person behind one or more accounts — to the server database. The
record is returned as stored by the server, including the identifier it was assigned.
A client with the same details is not deduplicated: every call creates a new record.
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
MT5Client (application/json) — Client record to create.
POST /api/v2/MT5/{tradePlatform}/ClientUserAdd/{clientId}/{login}
Binds the account with the given login to the client record, so the account is shown
under that client. An account can belong to one client at a time; attaching it again
to another client may fail with a platform error. The response carries the platform
result code of the operation.
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).
clientId
path
integer (int64)
yes
Client identifier.
login
path
integer (int64)
yes
Trade account login.
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/ClientUserAdd/$CLIENT_ID/$LOGIN" \
-H "Authorization: Bearer $TOKEN"
Read a client
GET /api/v2/MT5/{tradePlatform}/ClientRequest/{clientId}
Fetches the client record of the given identifier from the trade server. The call only
reads and changes nothing. An identifier that does not exist is answered with a platform
error rather than 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).
clientId
path
integer (int64)
yes
Client identifier.
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.
POST /api/v2/MT5/{tradePlatform}/ClientDelete/{clientId}
Removes the client record with the given identifier from the server database. The
operation is not reversible. Accounts attached to the client are not deleted by this
call and stay on the server. The response carries the platform result code of the
operation.
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).
clientId
path
integer (int64)
yes
Client identifier.
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.
person birth date The date of birth is specified in the FILETIME format: the number of 100-nanosecond intervals that have elapsed since January 1, 1601
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). 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.
MT5BatchResultListApiResponse
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). 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.
MT5ClientListApiResponse
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). 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.
MT5ResultApiResponse
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). 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.
UInt64ListApiResponse
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). 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.
MT5Document
Client document record — input and output of the document routes.
Property
Type
Description
recordID
integer (int64), nullable
Document identifier. Assigned by the server on creation; sent to address an existing document.
relatedClient
integer (int64), nullable
Identifier of the client the document belongs to (required).
approvedDate
string (date-time), nullable
Date the document was approved.
approvedBy
integer (int64), nullable
Login of the manager account that approved the document.
documentType
string, nullable
Document type name. One of: DOCUMENT_TYPE_OTHER, DOCUMENT_TYPE_FIRST, DOCUMENT_TYPE_PERSONAL_IDENTITY, DOCUMENT_TYPE_PERSONAL_ADDRESS, DOCUMENT_TYPE_REGISTERED_ADDRESS, DOCUMENT_TYPE_DIRECTORS_PASSPORT, DOCUMENT_TYPE_CERTIFICATE_OF_INCORPORATION, DOCUMENT_TYPE_CERTIFICATE_OF_DIRECTORS, DOCUMENT_TYPE_CERTIFICATE_OF_GOOD_STANDING, DOCUMENT_TYPE_LAST. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
documentSubtype
string, nullable
Document subtype name. One of: DOCUMENT_SUBTYPE_OTHER, DOCUMENT_SUBTYPE_FIRST, DOCUMENT_SUBTYPE_ID_CARD, DOCUMENT_SUBTYPE_PASSPORT, DOCUMENT_SUBTYPE_DRIVERS, DOCUMENT_SUBTYPE_BANK_CARD, DOCUMENT_SUBTYPE_UTILITY_BILL, DOCUMENT_SUBTYPE_BANK_STATEMENT, DOCUMENT_SUBTYPE_TAX_STATEMENT, DOCUMENT_SUBTYPE_SELFIE, DOCUMENT_SUBTYPE_PROFILE_IMAGE, DOCUMENT_SUBTYPE_ID_DOC_PHOTO, DOCUMENT_SUBTYPE_AGREEMENT, DOCUMENT_SUBTYPE_CONTRACT, DOCUMENT_SUBTYPE_RESIDENCE_PERMIT, DOCUMENT_SUBTYPE_EMPLOYMENT_CERTIFICATE, DOCUMENT_SUBTYPE_DRIVERS_TRANSLATION, DOCUMENT_SUBTYPE_INVESTOR_DOC, DOCUMENT_SUBTYPE_VEHICLE_REG_CERTIFICATE, DOCUMENT_SUBTYPE_INCOME_SOURCE, DOCUMENT_SUBTYPE_PAYMENT_METHOD, DOCUMENT_SUBTYPE_LAST. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
documentStatus
string, nullable
Document status name. One of: DOCUMENT_STATUS_NEW, DOCUMENT_STATUS_FIRST, DOCUMENT_STATUS_APPROVED, DOCUMENT_STATUS_REJECTED, DOCUMENT_STATUS_ARCHIVED, DOCUMENT_STATUS_DELETED, DOCUMENT_STATUS_LAST. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
Attachments linked to the document. Read-only: a link is created by the attachment routes, and a value sent here is ignored.
MT5DocumentApiResponse
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). 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.
MT5DocumentListApiResponse
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). 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.
MT5Comment
Comment on a client or on a client document — input and output of the comment routes.
Property
Type
Description
recordID
integer (int64), nullable
Comment identifier. Assigned by the server on creation.
relatedClient
integer (int64), nullable
Identifier of the client the comment belongs to (required).
relatedDocument
integer (int64), nullable
Identifier of the document the comment belongs to; empty means the comment is on the client.
Comment flags: which of the known marks the record carries.
extra
string, nullable
Reserved extra data of the comment.
text
string, nullable
Comment text.
commentType
string, nullable
Comment type name. One of: COMMENT_TYPE_UNDEFINED, COMMENT_TYPE_FIRST, COMMENT_TYPE_LOGRECORD, COMMENT_TYPE_CALLRECORD, COMMENT_TYPE_ROBOTRECORD, COMMENT_TYPE_LAST. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
commentResult
string, nullable
Result of the client contact the comment records. One of: COMMENT_RESULT_UNDEFINED, COMMENT_RESULT_FIRST, COMMENT_RESULT_CALL_NO_ANSWER, COMMENT_RESULT_CALL_WRONG_NUMBER, COMMENT_RESULT_CALL_NOT_INTERESTED, COMMENT_RESULT_CALL_SUCCESSFUL, COMMENT_RESULT_LAST. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
Attachments linked to the comment. Read-only: a link is created by the attachment routes, and a value sent here is ignored.
MT5CommentApiResponse
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). 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.
MT5CommentListApiResponse
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). 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.
MT5Attachment
File attached to a client, a document or a comment.
Property
Type
Description
recordID
integer (int64), nullable
Attachment identifier. Assigned by the server when the file is stored.
relatedClient
integer (int64), nullable
Identifier of the client the attachment belongs to (required when a file is stored).
fileType
string, nullable
File type name. One of: FILE_TYPE_OTHER, FILE_TYPE_FIRST, FILE_TYPE_TXT, FILE_TYPE_DOC, FILE_TYPE_PDF, FILE_TYPE_JPG, FILE_TYPE_PNG, FILE_TYPE_BMP, FILE_TYPE_ZIP, FILE_TYPE_LAST. Case-insensitive; the numeric value is accepted too. Any other value is refused with error code Validation.
fileName
string, nullable
File name.
fileContent
string (byte), nullable
File content. Sent as base64 in JSON; the whole file travels in the request and the response.
fileSize
integer (int32), nullable
Size of the file in bytes. Read-only: filled by the server.
File flags: which of the known marks the record carries.
documentID
integer (int64), nullable
Document the file is linked to. Used only when a file is stored; empty means no document link.
commentID
integer (int64), nullable
Comment the file is linked to. Used only when a file is stored; empty means no comment link.
MT5AttachmentApiResponse
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). 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.
MT5AttachmentListApiResponse
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). 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.
v2 error body, present when a call failed even though it answered HTTP 200. Code is the stable error category. ManagerCode is the raw result code of the trade server on MT4 (null otherwise: on MT5 the result name is in Message). Message is a human-readable description.
Property
Type
Description
code
WebApiErrorCode
Stable transport-level error code.
managerCode
ResultCode
Raw MT4 result code when ApiError.Code is MT4Error; null otherwise. On MT5 the result name is in ApiError.Message.
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.
MT5BatchResult
Outcome of one entry of a batch operation. The entries are returned in the order of the request.
Property
Type
Description
id
integer (int64), nullable
Identifier the entry was addressed to or created for: the record identifier on the document, comment and attachment routes, and the account login on the account-binding routes.
Reference to a file attached to a document or a comment: identifier, name and size, without the content.
Property
Type
Description
recordID
integer (int64)
Attachment identifier.
fileName
string, nullable
File name.
fileSize
integer (int32)
Size of the file in bytes.
MT5CommentFlags
Marks carried by a comment. Values match the trade server's own flag values. Flags: names of the set bits joined by ", " ("Deleted, Important"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: Deleted = 0x1, Important = 0x2. Accepted on input, never written: All = Deleted, Important.
MT5AttachmentFlags
Marks carried by an attached file. Values match the trade server's own flag values. Flags: names of the set bits joined by ", " ("Embedded"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: Embedded = 0x1.
MT5CommentListApiResponse
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). A call that reaches an operation answers HTTP 200 — only transport failures (401, 403, 404, 400, 5xx) use other status codes.