API v2 (current) · MT4 · 4 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.
Returns the current time of the MT4 trade server. A cheap call to
check that the token, the trade platform id and the connection work.
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 id (GUID)
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.
Server name, protocol version and build, time zone, and the state of
the operational subsystems — the part of the server record that does
not describe the server's infrastructure.
The administrative fields (storage paths, bind and web addresses,
adapter list, reserved block) are not included; use
ManagerCommonEx when they are needed.
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 id (GUID)
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.
The complete server record: identity, protocol version, socket and
feed timeouts, bind and web address lists, storage paths, runtime
counters, and the operational subsystems (demo accounts, rollover,
statements, live update).
Requires the sensitive-settings permission: the record describes the
server's infrastructure, not only its public identity.
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 id (GUID)
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.
Round-trips to the trade server. Returns log entries
in [from, to] range filtered by mode and an optional
free-text filter. Defaults: mode = Full, to = now
(server time).
Heavier endpoint — large date windows return large arrays. Pair with
reasonable from/to bounds; consider Idempotency-Key
for retry safety on slow links.
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 id (GUID)
from
query
string (date-time)
no
Window start (UTC, ISO 8601 — required)
to
query
string (date-time)
no
Window end (UTC, ISO 8601). Defaults to current server time.
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.
Types the operations above take and return, with their first-level properties; * marks a required one. The full graph is in the OpenAPI specification.
DateTimeApiResponse
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.
MT4CommonShortApiResponse
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.
Server-wide common settings without the administrative part: the storage paths, the bind and web address lists, the adapters list and the reserved block are not included.
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.
MT4CommonApiResponse
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.
Full server-wide common configuration of an MT4 trade server: identity, protocol version, bind and web address lists, storage paths, runtime counters and the operational subsystems (demo accounts, rollover, statements, live update).
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.
MT4ServerLogListApiResponse
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.
MT4CommonShort
Server-wide common settings without the administrative part: the storage paths, the bind and web address lists, the adapters list and the reserved block are not included.
Property
Type
Description
name
string, nullable
Trade server name
timeout
integer (int32)
Socket timeout, seconds
demoAccountType
DemoAccountType
Demo-account subsystem type
timeOfDemo
integer (int32)
Demo-account lifetime, days
daylightCorrection
integer (int32)
Daylight-correction setting
timeZoneReal
integer (int32)
Server time zone offset from UTC, in hours (DST-adjusted)
timeZone
integer (int32)
Server time zone offset from UTC, in hours
minClient
integer (int32)
Minimal authorized client version
minApi
integer (int32)
Minimal authorized API version
feederTimeout
integer (int32)
Data-feed switch timeout, seconds
keepEmails
integer (int32)
Internal mail keep period
endHour
integer (int32)
End-of-day time: hour
endMinute
integer (int32)
End-of-day time: minute
optimizationTime
integer (int32)
Optimization start time, minutes
optimizationLastTime
integer (int32)
Optimization last run time
optimizationCounter
integer (int32)
Optimization run counter
optimizationUnused
integer (int32)[]
Reserved for future use
antiFlood
integer (int32)
Anti-flood control enabled flag
floodControl
integer (int32)
Maximum anti-flood connections
liveUpdateMode
LiveUpdateMode
Live-update mode
lastOrder
integer (int32)
Last assigned order ticket (read only)
lastLogin
integer (int32)
Last assigned account login (read only)
lostLogin
integer (int32)
Lost-commission account login (read only)
rolloverMode
RolloverMode
Overnight rollover mode
overnightLastDay
integer (int32)
Day of the last overnight
overnightLastTime
integer (int32)
Time of the last overnight
overnightPrevTime
integer (int32)
Time of the overnight before the last one
overmonthLastMonth
integer (int32)
Month of the last generated report
serverVersion
integer (int32)
Server version
serverBuild
integer (int32)
Server build number
statementMode
StatementMode
Statement generation mode
monthlyStatementMode
MonthlyStatementMode
Monthly statement generation schedule
keepTicks
integer (int32)
Tick history keep period, days
statementWeekend
integer (int32)
Generate statements at weekends
lastActivate
string (date-time)
Last activation date and time
stopLast
string (date-time)
Last stop date and time
stopDelay
integer (int32)
Last stop delay
stopReason
ServerStopReason
Last stop reason
accountUrl
string, nullable
Account allocation URL
MT4Common
Full server-wide common configuration of an MT4 trade server: identity, protocol version, bind and web address lists, storage paths, runtime counters and the operational subsystems (demo accounts, rollover, statements, live update).
Property
Type
Description
owner
string, nullable
Broker / company display name
name
string, nullable
Trade server name
address
integer (int32)
IP address assigned to the server
port
integer (int32)
Server port
timeout
integer (int32)
Socket timeout, seconds
demoAccountType
DemoAccountType
Demo-account subsystem type
timeOfDemo
integer (int32)
Demo-account lifetime, days
daylightCorrection
integer (int32)
Daylight-correction setting
timeZoneReal
integer (int32)
Server time zone offset from UTC, in hours (DST-adjusted)
timeZone
integer (int32)
Server time zone offset from UTC, in hours
timeSync
string, nullable
Time-synchronization server address
minClient
integer (int32)
Minimal authorized client version
minApi
integer (int32)
Minimal authorized API version
feederTimeout
integer (int32)
Data-feed switch timeout, seconds
keepEmails
integer (int32)
Internal mail keep period
endHour
integer (int32)
End-of-day time: hour
endMinute
integer (int32)
End-of-day time: minute
optimizationTime
integer (int32)
Optimization start time, minutes
optimizationLastTime
integer (int32)
Optimization last run time
optimizationCounter
integer (int32)
Optimization run counter
optimizationUnused
integer (int32)[]
Reserved for future use
antiFlood
integer (int32)
Anti-flood control enabled flag
floodControl
integer (int32)
Maximum anti-flood connections
liveUpdateMode
LiveUpdateMode
Live-update mode
lastOrder
integer (int32)
Last assigned order ticket (read only)
lastLogin
integer (int32)
Last assigned account login (read only)
lostLogin
integer (int32)
Lost-commission account login (read only)
rolloverMode
RolloverMode
Overnight rollover mode
pathDatabase
string, nullable
Path to the databases
pathHistory
string, nullable
Path to the history bases
pathLog
string, nullable
Path to the logs
overnightLastDay
integer (int32)
Day of the last overnight
overnightLastTime
integer (int32)
Time of the last overnight
overnightPrevTime
integer (int32)
Time of the overnight before the last one
overmonthLastMonth
integer (int32)
Month of the last generated report
adapters
string, nullable
Network adapters list (read only)
bindAdresses
integer (int32)[]
Available bind addresses
serverVersion
integer (int32)
Server version
serverBuild
integer (int32)
Server build number
webAdresses
integer (int32)[]
Web services access list (comma separated IP addresses)
statementMode
StatementMode
Statement generation mode
monthlyStatementMode
MonthlyStatementMode
Monthly statement generation schedule
keepTicks
integer (int32)
Tick history keep period, days
statementWeekend
integer (int32)
Generate statements at weekends
reserved
integer (int32)[]
Reserved for future use
lastActivate
string (date-time)
Last activation date and time
stopLast
string (date-time)
Last stop date and time
stopDelay
integer (int32)
Last stop delay
stopReason
ServerStopReason
Last stop reason
accountUrl
string, nullable
Account allocation URL
MT4ServerLog
v2 record for one MT4 server journal entry. Returned by JournalRequest when querying server-side logs for a date window. Same field set as the the platform's ServerLog — the platform struct is already minimal, no secrets to drop. Code is returned as its name.