CPlugin

MT4 v2 :: Server Admin

API v2 (beta) · 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 from https://auth.cplugin.net/connect/token (scope webapi). $TRADE_PLATFORM_ID is the id of a trade platform registered in Toolbox.

Operations

List data feeders

GET /api/v2/MT4/{tradePlatform}/SrvFeeders

List of running data feeders on the MT4 server (admin-only read).

Manager (live) call to the wrapper's SrvFeeders. Returns the current set of running feeder configurations as opposed to CfgRequestFeeder which returns the static configuration. The data shape is the same as CfgRequestFeeder — MT4Feeder — and the credential (Password) is intentionally excluded.

Sorted by Name ascending. Paged with the same cursor codec as the rest of the v2 paged endpoints (Name is the cursor key).

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 Trade platform id (GUID)
limit query integer (int32) no Maximum number of items to return in one page. Omit to return all items in a single page. Maximum allowed value is 5000.
cursor query string no Opaque continuation token. Pass the value from the previous response's meta.paging.nextCursor to fetch the next page; omit for the first page.
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/v2/MT4/$TRADE_PLATFORM_ID/SrvFeeders" \
  -H "Authorization: Bearer $TOKEN"

Check license

GET /api/v2/MT4/{tradePlatform}/LicenseCheck/{licenseName}

Check a license name against the MT4 server's license registry — admin-only read.

Manager (live) call to the wrapper's LicenseCheck(name). Returns a bare bool payload: true when the wrapper's result code is Ok, indicating the license is recognized; false on any non-Ok code (covers both "license not found" and "manager lacks permission to query the license registry").

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 Trade platform id (GUID)
licenseName path string yes License name to verify against the MT4 server's registry
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/v2/MT4/$TRADE_PLATFORM_ID/LicenseCheck/$LICENSE_NAME" \
  -H "Authorization: Bearer $TOKEN"

POST /api/v2/MT4/{tradePlatform}/NotificationsSend

POST /api/v2/MT4/{tradePlatform}/NotificationsSend

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

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: 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

MT4NotificationsSendRequest (application/json)

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/v2/MT4/$TRADE_PLATFORM_ID/NotificationsSend" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "logins": [0], "message": "" }'

Get feeder log

GET /api/v2/MT4/{tradePlatform}/SrvFeederLog/{name}

Server log for a single feeder by name (admin-only read).

Manager (live) call to the wrapper's SrvFeederLog(name). Returns the feeder's log buffer as a string (empty when the feeder is unknown or has no recent log activity). Payload is the raw log text — not an array of lines — to preserve formatting at the wrapper boundary.

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 (GUID)
name path string yes Feeder name (matched server-side; case-sensitive)
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/v2/MT4/$TRADE_PLATFORM_ID/SrvFeederLog/$NAME" \
  -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.

MT4FeederListApiResponse

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.

PropertyTypeDescription
data MT4Feeder[]
error 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.
meta ApiMeta Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz. Paging is present only on paginated list responses; otherwise it is omitted — the global JSON context policy serialises null fields, so we override that here with System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.

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.

PropertyTypeDescription
data boolean
error 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.
meta ApiMeta Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz. Paging is present only on paginated list responses; otherwise it is omitted — the global JSON context policy serialises null fields, so we override that here with System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.

MT4NotificationsSendRequest

Request body for the v2 NotificationsSend admin endpoint — pushes a single message to one or more MT4 clients identified by account login. Maps onto the wrapper's NotificationsSend2(int[] logins, string message).

PropertyTypeDescription
logins integer (int32)[] Account logins to deliver the notification to (server-side fan-out — the wrapper sends one notification per recipient in a single Manager-API call).
message string, nullable Notification text. Single-line; the MT4 mobile client displays it as the push body. Controller enforces a length cap to keep the payload tractable on the unmanaged side.

StringApiResponse

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.

PropertyTypeDescription
data string, nullable
error 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.
meta ApiMeta Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz. Paging is present only on paginated list responses; otherwise it is omitted — the global JSON context policy serialises null fields, so we override that here with System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.

MT4Feeder

v2 DTO for a single MT4 quote/news feeder configuration. Curated subset of the wrapper's ConFeeder — drops the wrapper's Unused reserved blob AND the Password field (datafeed credentials).

PropertyTypeDescription
name string, nullable Feeder name (used as cursor key — assumed unique)
file string, nullable Datafeed loader filename (DLL or script path)
server string, nullable Upstream feeder server address
login string, nullable Datafeed login (upstream credential identifier)
keywords string, nullable Keywords for news filtering
enable integer (int32) Enable flag (0 = disabled, 1 = enabled — raw wrapper int)
dataFeedMode DataFeedMode Feed mode (quotes / news / both — wrapper enum)
timeout integer (int32) Maximum freeze time in seconds before considered stalled (default ~120)
timeoutReconnect integer (int32) Reconnect delay before "sleep" attempts threshold (default ~5s)
timeoutSleep integer (int32) Reconnect delay after "sleep" attempts threshold (default ~60s)
attempsSleep integer (int32) Reconnect count before switching to sleep timeout
newsLangId integer (int32) News language id

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.

PropertyTypeDescription
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 is the W3C trace-id for correlation in Seq/SigNoz. Paging is present only on paginated list responses; otherwise it is omitted — the global JSON context policy serialises null fields, so we override that here with System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.

PropertyTypeDescription
activityId string, nullable W3C trace id for correlating this response in logs and tracing (Seq/SigNoz).
paging PagingMeta Pagination info; present only on list responses, omitted otherwise.