CPlugin

MT4 :: Common

API v1 (stable) · MT4 · 4 operations · base URL https://cloud.mywebapi.com · OpenAPI v1 (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.

Operations

Server settings (short)

GET /api/MT4/{tradePlatform}/ManagerCommon

Few sensitive fields will be suppressed from output

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

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes
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.

Responses

Example

curl "https://cloud.mywebapi.com/api/MT4/$TRADE_PLATFORM_ID/ManagerCommon" \
  -H "Authorization: Bearer $TOKEN"

Server time

GET /api/MT4/{tradePlatform}/ServerTime

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

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes
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.

Responses

Example

curl "https://cloud.mywebapi.com/api/MT4/$TRADE_PLATFORM_ID/ServerTime" \
  -H "Authorization: Bearer $TOKEN"

Server settings

GET /api/MT4/{tradePlatform}/ManagerCommonEx

Including sensitive data

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

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes
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.

Responses

Example

curl "https://cloud.mywebapi.com/api/MT4/$TRADE_PLATFORM_ID/ManagerCommonEx" \
  -H "Authorization: Bearer $TOKEN"

Journal

GET /api/MT4/{tradePlatform}/JournalRequest/{from}/{to}/{mode}/{filter}

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

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform id
from path string (date-time) yes From date/time
to path string (date-time) no To date/time. Default: mgr.ServerTime() will be used.
mode path EnLogType no Journal records mode
filter path string no Filter string
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.

Responses

Example

curl "https://cloud.mywebapi.com/api/MT4/$TRADE_PLATFORM_ID/JournalRequest/$FROM/$TO/$MODE/$FILTER" \
  -H "Authorization: Bearer $TOKEN"

Schemas

Types the operations above take and return, with their first-level properties; * marks a required one. The full graph is in the OpenAPI specification.

ConCommonShort

Shorter and less sensitive version of ConCommon structure, ip address, disk paths, etc removed from this structure

PropertyTypeDescription
name string, nullable server name
timeout integer (int32) sockets timeout
demoAccountType DemoAccountType
timeOfDemo integer (int32) demo-account living time
daylightCorrection integer (int32) allow daylight correction
timeZoneReal integer (int32) time zone with day light mode
timeZone integer (int32) time zone 0-GMT;-1=GMT-1;1=GMT+1;
minClient integer (int32) minimal authorized client version
minApi integer (int32) minimal authorized client version
feederTimeout integer (int32) data feed switch timeout
keepEmails integer (int32) internal mail keep period
endHour integer (int32) end of day time-hour and minute
endMinute integer (int32) end of day time-hour and minute
optimizationTime integer (int32) optimization start time (minutes)
optimizationLastTime integer (int32) optimization last time
optimizationCounter integer (int32) internal variable
optimizationUnused integer (int32)[] reserved for future use
antiFlood integer (int32) enable antiflood control
floodControl integer (int32) max. antiflood connections
liveUpdateMode LiveUpdateMode
lastOrder integer (int32) last order's ticket (read only)
lastLogin integer (int32) last account's number (read only)
lostLogin integer (int32) lost commission's login (read only)
rolloverMode RolloverMode
overnightLastDay integer (int32) day of last overnight
overnightLastTime integer (int32) time of last overnight
overnightPrevTime integer (int32) time of время next to last overnight
overmonthLastMonth integer (int32) month of last report
serverVersion integer (int32) server version
serverBuild integer (int32) server build
statementMode StatementMode statement generation time
monthlyStatementMode MonthlyStatementMode monthly statement generation day
keepTicks integer (int32) ticks keep period
statementWeekend integer (int32) generate statements at weekends
lastActivate string (date-time) last activation datetime
stopLast string (date-time) last stop datetime
stopDelay integer (int32) last stop delay
stopReason ServerStopReason last stop reason
accountUrl string, nullable account allocation URL

ConCommon

PropertyTypeDescription
owner string, nullable
name string, nullable
address integer (int32)
port integer (int32)
timeout integer (int32)
demoAccountType DemoAccountType
timeOfDemo integer (int32)
daylightCorrection integer (int32)
timeZoneReal integer (int32)
timeZone integer (int32)
timeSync string, nullable
minClient integer (int32)
minApi integer (int32)
feederTimeout integer (int32)
keepEmails integer (int32)
endHour integer (int32)
endMinute integer (int32)
optimizationTime integer (int32)
optimizationLastTime integer (int32)
optimizationCounter integer (int32)
optimizationUnused integer (int32)[]
antiFlood integer (int32)
floodControl integer (int32)
liveUpdateMode LiveUpdateMode
lastOrder integer (int32)
lastLogin integer (int32)
lostLogin integer (int32)
rolloverMode RolloverMode
pathDatabase string, nullable
pathHistory string, nullable
pathLog string, nullable
overnightLastDay integer (int32)
overnightLastTime integer (int32)
overnightPrevTime integer (int32)
overmonthLastMonth integer (int32)
adapters string, nullable
bindAdresses integer (int32)[]
serverVersion integer (int32)
serverBuild integer (int32)
webAdresses integer (int32)[]
statementMode StatementMode
monthlyStatementMode MonthlyStatementMode
keepTicks integer (int32)
statementWeekend integer (int32)
reserved integer (int32)[]
lastActivate string (date-time)
stopLast string (date-time)
stopDelay integer (int32)
stopReason ServerStopReason
accountUrl string, nullable

ServerLog

PropertyTypeDescription
code LogMessageType
time string, nullable
ip string, nullable
message string, nullable

EnLogType

Values: Standard, Logins, Trades, Errors, Full, Updater, SendMail, Failover

DemoAccountType

Values: Disabled, Prolong, Fixed

LiveUpdateMode

Values: No, All, NoServer

RolloverMode

Values: Normal, ReopenByClosePrice, ReopenByBid

StatementMode

Values: EndDay, StartDay

MonthlyStatementMode

Values: EndMonth, StartMonth

ServerStopReason

Values: None, Restart, Shutdown, LiveUpdate

LogMessageType

Values: Ok, Trade, Login, Warn, Err, Att