CPlugin

MT5 v2 :: Config

API v2 (beta) · MT5 · 2 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

Symbols by mask

GET /api/v2/MT5/{tradePlatform}/SymbolRequestArray/{mask}

Returns the symbol configuration of every symbol matching the mask. The mask takes full symbol names including the path (Forex\EURUSD), several names separated by commas, and the wildcards * (any value) and ! (exclude), for example Forex\*,!Forex\EURUSD — every symbol of the Forex subgroup except EURUSD.

When a group is given, the symbol settings are returned as they are redefined for that group; without it the base symbol settings are returned.

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 identifier (GUID).
mask path string yes Symbol mask: one or more comma-separated names with optional wildcards.
group query string no Group whose symbol overrides are applied; omitted means base settings.
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/MT5/$TRADE_PLATFORM_ID/SymbolRequestArray/$MASK" \
  -H "Authorization: Bearer $TOKEN"

Groups by mask

GET /api/v2/MT5/{tradePlatform}/GroupRequestArray/{mask}

Returns the configuration of every group matching the mask. The mask takes full group names including the path (demo\demoforex), several names separated by commas, and the wildcards * (any value) and ! (exclude), for example demo*,!demoforex — every group whose name starts with demo except demoforex. The SMTP credentials of the mail reports server (ReportsSMTPLogin, ReportsSMTPPass) are never returned: both fields are always empty.

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 identifier (GUID).
mask path string yes Group mask: one or more comma-separated names with optional wildcards.
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/MT5/$TRADE_PLATFORM_ID/GroupRequestArray/$MASK" \
  -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.

MT5SymbolListApiResponse

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 MT5Symbol[]
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 identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.

MT5ConGroupListApiResponse

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 MT5ConGroup[]
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 identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.

MT5Symbol

PropertyTypeDescription
symbol string, nullable name
path string, nullable hierarchical symbol path (including symbol name)
isin string, nullable ISIN
description string, nullable local description
international string, nullable internation description
basis string, nullable basic symbol name
source string, nullable source symbol name
page string, nullable symbol specification page URL
currencyBase string, nullable symbol base currency
currencyBaseDigits integer (int32), nullable Read-only: the trade server does not let this value be changed.
currencyProfit string, nullable symbol profit currency
currencyProfitDigits integer (int32), nullable Read-only: the trade server does not let this value be changed.
currencyMargin string, nullable symbol margin currency
currencyMarginDigits integer (int32), nullable Read-only: the trade server does not let this value be changed.
color integer (int32), nullable symbol color
colorBackground integer (int32), nullable symbol background color
digits integer (int32), nullable symbol digits
point number (double), nullable
multiply number (double), nullable Read-only: the trade server does not let this value be changed.
tickFlags EnTickFlags EnTickFlags
tickBookDepth integer (int32), nullable Depth of Market depth (both legs)
filterSoft integer (int32), nullable filtration soft level
filterSoftTicks integer (int32), nullable filtration soft level counter
filterHard integer (int32), nullable filtration hard level
filterHardTicks integer (int32), nullable filtration hard level counter
filterDiscard integer (int32), nullable filtration discard level
filterSpreadMax integer (int32), nullable spread max value
filterSpreadMin integer (int32), nullable spread min value
tradeMode EnTradeMode EnTradeMode
calcMode EnCalcMode EnCalcMode
execMode EnExecutionMode EnExecutionMode
gtcMode EnGtcMode EnGTCMode
fillFlags EnFillingFlags EnFillingFlags
expirFlags EnExpirationFlags EnExpirationFlags
spread integer (int32), nullable symbol spread (0-floating)
spreadBalance integer (int32), nullable spread balance
spreadDiff integer (int32), nullable spread difference
spreadDiffBalance integer (int32), nullable spread difference balance
tickValue number (double), nullable tick value
tickSize number (double), nullable tick size
contractSize number (double), nullable contract size
stopsLevel integer (int32), nullable stops level
freezeLevel integer (int32), nullable freeze level
quotesTimeout integer (int32), nullable The time to wait for quotes in seconds, after which trading is automatically disabled for the symbol.
volumeMin integer (int64), nullable minimal volume
volumeMax integer (int64), nullable maximal volume
volumeStep integer (int64), nullable volume step
volumeLimit integer (int64), nullable cumulative positions and orders limit
marginFlags EnMarginFlags EnMarginFlags
marginInitial number (double), nullable initial margin
marginMaintenance number (double), nullable maintenance margin
marginLong number (double), nullable long orders and positions margin rate
marginShort number (double), nullable short orders and positions margin rate
marginLimit number (double), nullable limit orders and positions margin rate
marginStop number (double), nullable stop orders and positions margin rate
marginStopLimit number (double), nullable stop-limit orders and positions margin rate
swapMode EnSwapMode EnSwapMode
swapLong number (double), nullable long positions swaps rate
swapShort number (double), nullable short positions swaps rate
swap3Day EnSwapDays 3 time swaps day, EnSwapDay
timeStart string (date-time), nullable trade start date
timeExpiration string (date-time), nullable The date of trading expiration for a symbol. It is considered that there is no time limitation for trading by a symbol if both IMTConSymbol::TimeStart and IMTConSymbol::TimeExpiration are equal to 0.
sessionQuote MT5SymbolSession[][] Not yet implemented. Contact us for further information Update a quoting session of a symbol by the day and index. The day is specified by a value 0 (Sunday) to 6 (Saturday).
sessionTrade MT5SymbolSession[][] Not yet implemented. Contact us for further information
reFlags EnRequestFlags request execution flags
reTimeout integer (int32), nullable Time in seconds during which the price issued by a dealer in the request execution mode is valid.
ieCheckMode EnInstantMode instant execution check mode
ieTimeout integer (int32), nullable Get and set the maximum allowed difference between the time of arrival of the price, at which the client places an order, and the time of the last price.
ieSlipProfit integer (int32), nullable instant execution profit slippage
ieSlipLosing integer (int32), nullable instant execution losing slippage
ieVolumeMax integer (int64), nullable instant execution max volume
priceSettle number (double), nullable settle price (for futures)
priceLimitMax number (double), nullable price limit max (for futures)
priceLimitMin number (double), nullable price limit min (for futures)
tradeFlags EnTradeFlags EnTradeFlags
orderFlags EnOrderFlags EnOrderFlags
marginRateInitial object, nullable orders and positions margin rates
marginRateMaintenance object, nullable orders and positions margin rates
optionsMode EnOptionMode options mode EnOptionMode
priceStrike number (double), nullable option strike price value

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 identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.

PropertyTypeDescription
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.

MT5ConGroup

PropertyTypeDescription
group string, nullable group name
server integer (int64), nullable group trade server ID
permissionsFlags EnPermissionsFlags EnPermissionsFlags
authMode EnAuthMode EnAuthMode
authPasswordMin integer (int32), nullable minimal password length
company string, nullable company name
companyPage string, nullable company web page URL
companyEmail string, nullable company email
companySupportPage string, nullable company support site URL
companySupportEmail string, nullable company support email
companyCatalog string, nullable company catalog name (for reports and email templates)
currency string, nullable deposit currency
currencyDigits integer (int32), nullable
reportsMode EnReportsMode EnReportsMode
reportsFlags EnReportsFlags EnReportsFlags
reportsSMTP string, nullable reports SMTP server address:ports
reportsSMTPLogin string, nullable reports SMTP server login
reportsSMTPPass string, nullable reports SMTP server password
newsMode EnNewsMode EnNewsMode
newsCategory string, nullable news category filter string
newsLang integer (int32)[] Setter not yet implemented. If you want to send this value to MT5, ask vendor to implement this feature. Exception will be thrown if you send anything but null here. allowed news languages (Windows API LANGID used)
mailMode EnMailMode EnMailMode
tradeFlags EnTradeRightsFlags EnTradeFlags
tradeInterestRate number (double), nullable interest rate for free deposit money
tradeVirtualCredit number (double), nullable virtual credit
marginFreeMode EnFreeMarginMode EnFreeMarginMode
marginSOMode EnStopOutMode EnStopOutMode
marginCall number (double), nullable Margin Call level value
marginStopOut number (double), nullable Sto-Out level value
demoLeverage integer (int32), nullable default demo accounts leverage
demoDeposit number (double), nullable default demo accounts deposit
limitHistory EnHistoryLimit EnHistoryLimit
limitOrders integer (int32), nullable max. order limit
limitSymbols integer (int32), nullable max. selected symbols limit
commissions map<string, MT5ConCommission> /// Setter not yet implemented. If you want to send this value to MT5, ask vendor to implement this feature. Exception will be thrown if you send anything but null here.
marginFreeProfitMode integer (int32), nullable margin free profit accounting mode
marginMode EnMarginMode group risk management mode - EnMarginMode
authOTPMode EnAuthOTPMode OTP authentication mode - EnAuthOTPMode
tradeTransferMode EnTransferMode deposit transfer mode - EnTransferMode
marginFlags EnMarginCalcFlags margin calculation flags EnMarginFlags
limitPositions integer (int32), nullable max. positions limit
reportsEmail string, nullable reports SMTP email account
companyDepositPage string, nullable company deposit URL
companyWithdrawalPage string, nullable company deposit URL
demoInactivityPeriod integer (int32), nullable demo groups in days, orders and positions will be deleted after this period