CPlugin

MT4 :: Users

API v1 (stable) · MT4 · 12 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

All users (pumping)

GET /api/MT4/{tradePlatform}/UsersGet

Get all users database from local (pumping) cache

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
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/UsersGet" \
  -H "Authorization: Bearer $TOKEN"

Users by login

GET /api/MT4/{tradePlatform}/UserRecordsRequest

Request users from MT4 server using list of logins

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
logins query integer (int32)[] no List of logins to be requested from server. If none specified - BadRequest will be returned
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/UserRecordsRequest" \
  -H "Authorization: Bearer $TOKEN"

All users

GET /api/MT4/{tradePlatform}/UsersRequest

Request all users database from MT4 server

Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform id
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/UsersRequest" \
  -H "Authorization: Bearer $TOKEN"

User (pumping)

GET /api/MT4/{tradePlatform}/UserRecordGet/{login}

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
login path integer (int32) 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/UserRecordGet/$LOGIN" \
  -H "Authorization: Bearer $TOKEN"

Create new user

POST /api/MT4/{tradePlatform}/UserRecordNew

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 Trade platform id
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

UserRecordNew (application/json)

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/MT4/$TRADE_PLATFORM_ID/UserRecordNew" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "group": "", "name": "", "regDate": "2026-01-01T00:00:00Z", "lastDate": "2026-01-01T00:00:00Z", "timeStamp": "2026-01-01T00:00:00Z", "login": 0 }'

Update user

POST /api/MT4/{tradePlatform}/UserRecordUpdate

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 Trade platform id
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

UserRecord (application/json) — User record to be updated on server

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/MT4/$TRADE_PLATFORM_ID/UserRecordUpdate" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "regDate": "2026-01-01T00:00:00Z", "lastDate": "2026-01-01T00:00:00Z", "timeStamp": "2026-01-01T00:00:00Z", "login": 0, "group": "", "password": "" }'

Margin level (pumping)

GET /api/MT4/{tradePlatform}/MarginLevelGet/{login}

Get margin level from local cache (pumping). If none open trades present - will return 404 NOT FOUND.

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
login path integer (int32) 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/MarginLevelGet/$LOGIN" \
  -H "Authorization: Bearer $TOKEN"

Margin level

GET /api/MT4/{tradePlatform}/MarginLevelRequest/{login}

Request margin level from MT4 server

Timeout: 10 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform id
login path integer (int32) 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/MarginLevelRequest/$LOGIN" \
  -H "Authorization: Bearer $TOKEN"

Password - check

POST /api/MT4/{tradePlatform}/UserPasswordCheck/{login}

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 Trade platform id
login path integer (int32) 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

string (application/json)

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/MT4/$TRADE_PLATFORM_ID/UserPasswordCheck/$LOGIN" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '""'

Password - change

POST /api/MT4/{tradePlatform}/UserPasswordSet/{login}

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 Trade platform id
login path integer (int32) yes
changeInvestor query boolean no Change investors password
cleanPubkey query boolean no Do clean public key
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

string (application/json) — The password

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/MT4/$TRADE_PLATFORM_ID/UserPasswordSet/$LOGIN" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '""'

Balance - check (admin)

GET /api/MT4/{tradePlatform}/AdmBalanceCheck/{login}

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
login path integer (int32) 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/AdmBalanceCheck/$LOGIN" \
  -H "Authorization: Bearer $TOKEN"

Balance - fix (admin)

GET /api/MT4/{tradePlatform}/AdmBalanceFix/{login}

Timeout: 5 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform id
login path integer (int32) yes
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.

Responses

Example

curl "https://cloud.mywebapi.com/api/MT4/$TRADE_PLATFORM_ID/AdmBalanceFix/$LOGIN" \
  -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.

UserRecord

PropertyTypeDescription
regDate string (date-time)
lastDate string (date-time)
timeStamp string (date-time)
login integer (int32)
group string, nullable
password string (byte), nullable
enable integer (int32)
enableChangePassword integer (int32)
enableReadOnly integer (int32)
enableOTP integer (int32)
enableFlags integer (int32)
enableReserved integer (int32)[]
passwordInvestor string (byte), nullable
passwordPhone string, nullable
name string, nullable
country string, nullable
city string, nullable
state string, nullable
zipCode string, nullable
address string, nullable
leadSource string, nullable
phone string, nullable
email string, nullable
comment string, nullable
id string, nullable
status string, nullable
leverage integer (int32)
agentAccount integer (int32)
lastIP integer (int32)
balance number (double)
prevMonthBalance number (double)
prevBalance number (double)
credit number (double)
interestRate number (double)
taxes number (double)
prevMonthEquity number (double)
prevEquity number (double)
reserved2 number (double)[]
otpSecret string (byte), nullable
secureReserved string, nullable
sendReports integer (int32)
mqid integer (int32)
userColor integer (int32)
unused string (byte), nullable
apiData string (byte), nullable

HTTPError

PropertyTypeDescription
errorType HttpStatusCodeType type of error described here
errorCode HttpStatusCode If ErrorType is MT4API, it contains MT4 ManagerAPI response code. If ErrorType is MT5API, it contains MT5 ManagerAPI response code.
errorDescription string, nullable If ErrorType is MT4API, it contains MT4 ManagerAPI response code description. If ErrorType is MT5API, it contains MT5 ManagerAPI response code description.
requestId string (uuid) Unique request tracking ID

UserRecordNew

PropertyTypeDescription
regDate string (date-time), nullable registration date
lastDate string (date-time), nullable last coonection time
timeStamp string (date-time), nullable timestamp
login integer (int32), nullable
group * string
password string, nullable Password in plain-text, available only once when you create user
enable integer (int32), nullable
enableChangePassword integer (int32), nullable allow to change password
enableReadOnly integer (int32), nullable allow to open/positions (TRUE-may not trade)
enableOTP integer (int32), nullable allow to use one-time password
enableReserved integer (int32)[] for future use
passwordInvestor string, nullable read-only mode password. In plain-text available only once when you create user
passwordPhone string, nullable
name * string
country string, nullable
city string, nullable
state string, nullable
zipCode string, nullable
address string, nullable
leadSource string, nullable
phone string, nullable
email string, nullable
comment string, nullable
id string, nullable SSN (IRD)
status string, nullable status
leverage integer (int32), nullable leverage
agentAccount integer (int32), nullable agent account
lastIP integer (int32), nullable last visit ip
balance number (double), nullable balance
prevMonthBalance number (double), nullable previous month balance
prevBalance number (double), nullable previous day balance
credit number (double), nullable credit
interestRate number (double), nullable accumulated interest rate
taxes number (double), nullable taxes
prevMonthEquity number (double), nullable previous month equity
prevEquity number (double), nullable previous day equity
reserved2 number (double)[] for future use
otpSecret string (byte), nullable public key, byte[32] via Base64
secureReserved string, nullable
sendReports integer (int32), nullable enable send reports by email
mqid integer (int32), nullable MQ client identificator
userColor integer (int32), nullable color got to client (used by MT Manager)
unused string (byte), nullable for future use, byte[40] via Base64
apiData string (byte), nullable for API usage, byte[16] via Base64

MarginLevel

PropertyTypeDescription
group string, nullable
login integer (int32)
leverage integer (int32)
updated integer (int32)
balance number (double)
equity number (double)
volume integer (int32)
margin number (double)
free number (double)
level number (double)
controllingType MarginControllingType
levelType MarginLevelType

BalanceDiff

PropertyTypeDescription
login integer (int32)
diff number (double)

HttpStatusCodeType

type of error described here

Values: HTTP, MT4API, MT5API

HttpStatusCode

Values: Continue, SwitchingProtocols, Processing, EarlyHints, OK, Created, Accepted, NonAuthoritativeInformation, NoContent, ResetContent, PartialContent, MultiStatus, AlreadyReported, IMUsed, MultipleChoices, MovedPermanently, Found, SeeOther, NotModified, UseProxy, Unused, RedirectKeepVerb, PermanentRedirect, BadRequest, Unauthorized, PaymentRequired, Forbidden, NotFound, MethodNotAllowed, NotAcceptable, ProxyAuthenticationRequired, RequestTimeout, Conflict, Gone, LengthRequired, PreconditionFailed, RequestEntityTooLarge, RequestUriTooLong, UnsupportedMediaType, RequestedRangeNotSatisfiable, ExpectationFailed, MisdirectedRequest, UnprocessableEntity, Locked, FailedDependency, UpgradeRequired, PreconditionRequired, TooManyRequests, RequestHeaderFieldsTooLarge, UnavailableForLegalReasons, InternalServerError, NotImplemented, BadGateway, ServiceUnavailable, GatewayTimeout, HttpVersionNotSupported, VariantAlsoNegotiates, InsufficientStorage, LoopDetected, NotExtended, NetworkAuthenticationRequired

MarginControllingType

Values: Percent, Currency

MarginLevelType

Values: Ok, MarginCall, StopOut