CPlugin

MT5 :: Configuration Databases :: Symbols

API v1 (stable) · MT5 · 3 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

Symbol by name (pumping)

GET /api/MT5/{tradePlatform}/SymbolGet/{symbol}

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
symbol path string yes Name of the configuration
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/MT5/$TRADE_PLATFORM_ID/SymbolGet/$SYMBOL" \
  -H "Authorization: Bearer $TOKEN"

Update Symbol

POST /api/MT5/{tradePlatform}/SymbolUpdate/{symbol}

Only settings will be accepted by MT5: ExecMode Color StopsLevel SpreadBalance SpreadDiff SpreadDiffBalance. Remaining will be ignored;

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
symbol path string 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

MT5Symbol (application/json) — Name of the configuration

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/MT5/$TRADE_PLATFORM_ID/SymbolUpdate/$SYMBOL" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "symbol": "", "path": "", "isin": "", "description": "", "international": "", "basis": "" }'

Symbols by mask

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

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
mask path string yes One or more symbols separated by commas. Specify the full name of the symbol, including the path. For example, Forex\EURUSD. The symbol name can be obtained by using the IMTConSymbol::Symbol method. Symbols can also be specified using wildcard characters: "*" (any value) and "!" (exclude). For example, Forex\*,!Forex\EURUSD — all symbols in the Forex subgroup except EURUSD.
group path string no The name of the group whose symbol settings should be used (IMTConGroupSymbol). The method will pass symbol configurations based on how they are redefined for the specified group. If the parameter is null, the method will pass the basic symbol 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/MT5/$TRADE_PLATFORM_ID/SymbolRequestArray/$MASK/$GROUP" \
  -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.

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 Has No Setter In ManagerAPI, so all you can is to read this value.
currencyProfit string, nullable symbol profit currency
currencyProfitDigits integer (int32), nullable Has No Setter In ManagerAPI, so all you can is to read this value.
currencyMargin string, nullable symbol margin currency
currencyMarginDigits integer (int32), nullable Has No Setter In ManagerAPI, so all you can is to read this value.
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 Has No Setter In ManagerAPI, so all you can is to read this value.
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

MT5Error

PropertyTypeDescription
errorDescription string, nullable MT5 ManagerAPI response code description.
errorCode MT5Result MT5 ManagerAPI response code
errorType MT5ResultType type of error described here
requestId string (uuid) Unique request tracking ID

EnTickFlags

Flags: names of the set bits joined by ", " ("Realtime, CollectRaw"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: Realtime = 0x1, CollectRaw = 0x2, FeedStats = 0x4, NegativePrices = 0x8. Accepted on input, never written: All = Realtime, CollectRaw, FeedStats, NegativePrices.

EnTradeMode

Values: Disabled, LongOnly, ShortOnly, CloseOnly, Full

EnCalcMode

Values: Forex, Futures, Cfd, CfdIndex, CfdLeverage, ForexNoLeverage, ExchStocks, ExchFutures, ExchFuturesForts, ExchOptions, ExchOptionsMargin, ExchBonds, ExchStocksMoex, ExchBondsMoex, ServCollateral

EnExecutionMode

Values: Request, Instant, Market, Exchange

EnGtcMode

Values: GtC, Daily, DailyNoStops

EnFillingFlags

Flags: names of the set bits joined by ", " ("FoK, IoC"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: FoK = 0x1, IoC = 0x2, BoC = 0x4. Accepted on input, never written: All = FoK, IoC, BoC.

EnExpirationFlags

Flags: names of the set bits joined by ", " ("GtC, Day"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: GtC = 0x1, Day = 0x2, Specified = 0x4, SpecifiedDay = 0x8. Accepted on input, never written: All = GtC, Day, Specified, SpecifiedDay.

EnMarginFlags

Flags: names of the set bits joined by ", " ("CheckProcess, CheckSLTP"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: CheckProcess = 0x1, CheckSLTP = 0x2, HedgeLargeLeg = 0x4, ExcludePl = 0x8, RecalcRates = 0x10. Accepted on input, never written: All = CheckProcess, CheckSLTP, HedgeLargeLeg, ExcludePl.

EnSwapMode

Values: Disabled, ByPoints, BySymbolCurrency, ByMarginCurrency, ByGroupCurrency, ByInterestCurrent, ByInterestOpen, ReopenByClosePrice, ReopenByBid, ByProfitCurrency

EnSwapDays

Values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Disabled

MT5SymbolSession

PropertyTypeDescription
open integer (int32), nullable The session opening time in minutes from 00:00. For example, 100 denotes 01:40.
openHours integer (int32), nullable Get the number of hours in the opening time of trading or quoting session of a symbol.
openMinutes integer (int32), nullable The number of minutes in the opening time of trading or quoting session of a symbol.
close integer (int32), nullable The session closing time in minutes from 00:00. For example, 100 denotes 01:40.
closeHours integer (int32), nullable The number of hours in the closing time of trading or quoting session of a symbol.
closeMinutes integer (int32), nullable The number of minutes in the closing time of trading or quoting session of a symbol.

EnRequestFlags

Flags: names of the set bits joined by ", " ("Order"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: Order = 0x1.

EnInstantMode

This enumeration is used in the following methods: IMTConSymbol::IECheckMode IMTConGroupSymbol::IECheckMode IMTConGroupSymbol::IECheckModeDefault

Values: Normal

EnTradeFlags

Common Trade Flags Flags: names of the set bits joined by ", " ("ProfitByMarket, AllowSignals"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: ProfitByMarket = 0x1, AllowSignals = 0x2. Accepted on input, never written: TradeFlagsAll = ProfitByMarket, AllowSignals.

EnOrderFlags

Flags: names of the set bits joined by ", " ("Market, Limit"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: Market = 0x1, Limit = 0x2, Stop = 0x4, StopLimit = 0x8, SL = 0x10, TP = 0x20, CloseBy = 0x40. Accepted on input, never written: All = Market, Limit, Stop, StopLimit, SL, TP, CloseBy.

EnOptionMode

Values: EuropeanCall, EuropeanPut, AmericanCall, AmericanPut

EnSpliceType

Values: None, Unadjusted, Adjusted

EnSpliceTimeType

Values: Expiration

EnChartMode

Values: BidPrice, LastPrice, Old

EnInstantFlags

Flags: names of the set bits joined by ", " ("FastConfirmation"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: FastConfirmation = 0x1.

EnSectors

Values: Undefined, BasicMaterials, CommunicationServices, ConsumerCyclical, ConsumerDefensive, Energy, Financial, Healthcare, Industrials, RealEstate, Technology, Utilities, Currency, CurrencyCrypto, Indexes, Commodities

EnIndustries

Values: Undefined, AgriculturalInputs, Aluminium, BuildingMaterials, Chemicals, CokingCoal, Copper, Gold, LumberWood, IndustrialMetals, PreciousMetals, Paper, Silver, SpecialtyChemicals, Steel, BasicMaterialsEnd, Advertising, Broadcasting, GamingMultimedia, Entertainment, InternetContent, Publishing, Telecom, CommunicationEnd, ApparelManufacturing, ApparelRetail, AutoManufacturers, AutoParts, AutoDealership, DepartmentStores, FootwearAccessories, Furnishings, Gambling, HomeImprovRetail, InternetRetail, Leisure, Lodging, LuxuryGoods, PackagingContainers, PersonalServices, RecreationalVehicles, ResidentConstruction, ResortsCasinos, Restaurants, SpecialtyRetail, TextileManufacturing, TravelServices, ConsumerCyclEnd, BeveragesBrewers, BeveragesNonAlco, BeveragesWineries, Confectioners, DiscountStores, EducationTrainig, FarmProducts, FoodDistribution, GroceryStores, HouseholdProducts, PackagedFoods, Tobacco, ConsumerDefEnd, OilGasDrilling, OilGasEp, OilGasEquipment, OilGasIntegrated, OilGasMidstream, OilGasRefining, ThermalCoal, Uranium, EnergyEnd, ExchangeTradedFund, AssetsManagement, BanksDiversified, BanksRegional, CapitalMarkets, CloseEndFundDebt, CloseEndFundEquity, CloseEndFundForeign, CreditServices, FinancialConglomerate, FinancialDataExchange, InsuranceBrokers, InsuranceDiversified, InsuranceLife, InsuranceProperty, InsuranceReinsurance, InsuranceSpecialty, MortgageFinance, ShellCompanies, FinancialEnd, Biotechnology, DiagnosticsResearch, DrugsManufacturers, DrugsManufacturersSpec, HealthcarePlans, HealthInformation, MedicalFacilities, MedicalDevices, MedicalDistribution, MedicalInstruments, PharmRetailers, HealthcareEnd, AerospaceDefense, Airlines, AirportsServices, BuildingProducts, BusinessEquipment, Conglomerates, ConsultingServices, ElectricalEquipment, EngineeringConstruction, FarmHeavyMachinery, IndustrialDistribution, InfrastructureOperations, FreightLogistics, MarineShipping, MetalFabrication, PollutionControl, Railroads, RentalLeasing, SecurityProtection, SpealityBusinessServices, SpealityMachinery, StuffingEmployment, ToolsAccessories, Trucking, WasteManagement, IndustrialsEnd, RealEstateDevelopment, RealEstateDiversified, RealEstateServices, ReitDiversified, ReitHealtcare, ReitHotelMotel, ReitIndustrial, ReitMortage, ReitOffice, ReitResidental, ReitRetail, ReitSpeciality, RealEstateEnd, CommunicationEquipment, ComputerHardware, ConsumerElectronics, ElectronicComponents, ElectronicDistribution, ItServices, ScientificInstruments, SemiconductorEquipment, Semiconductors, SoftwareApplication, SoftwareInfrastructure, Solar, TechnologyEnd, UtilitiesDiversified, UtilitiesPowerProducers, UtilitiesRenewable, UtilitiesRegulatedElectric, UtilitiesRegulatedGas, UtilitiesRegulatedWater, UtilitiesEnd, CommoditiesAgricultural, CommoditiesEnergy, CommoditiesMetals, CommoditiesPrecious, CommoditiesEnd

EnSwapFlags

Flags: names of the set bits joined by ", " ("ConsiderHolidays"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: ConsiderHolidays = 0x1.

MT5Result

Values: Ok, OkNone, Error, ErrParams, ErrData, ErrDisk, ErrMem, ErrNetwork, ErrPermissions, ErrTimeout, ErrConnection, ErrNoService, ErrFrequent, ErrNotfound, ErrPartial, ErrShutdown, ErrCancel, ErrDuplicate, AuthClientInvalid, AuthAccountInvalid, AuthAccountDisabled, AuthAdvanced, AuthCertificate, AuthCertificateBad, AuthNotConfirmed, AuthServerInternal, AuthServerBad, AuthUpdateOnly, AuthClientOld, AuthManagerNoConfig, AuthManagerIPBlock, AuthGroupInvalid, AuthCaDisabled, AuthInvalidID, AuthInvalidIp, AuthInvalidType, AuthServerBusy, AuthServerCert, AuthAccountUnknown, AuthServerOld, AuthServerLimit, AuthMobileDisabled, AuthManagerType, AuthDemoDisabled, AuthResetPassword, AuthOTPInvalid, AuthOTPNeedSecret, AuthMigrationMT4, AuthMigrationMT5, AuthInvalidVerify, AuthVerifyBadEmail, AuthVerifyBadPhone, AuthAPIDisabled, CfgLastAdmin, CfgLastAdminGroup, CfgNotEmpty, CfgInvalidRange, CfgNotManagerLogin, CfgBuiltin, CfgDuplicate, CfgLimitReached, CfgNoAccessToMain, CfgDealerIDExist, CfgBindAddressExist, CfgWorkingTrade, CfgGatewayNameExist, CfgSwitchToBackup, CfgNoBackupModule, CfgNoTradeModule, CfgNoHistoryModule, CfgAnotherSwitch, CfgNoLicenseFile, CfgGatewayLoginExist, CfgInvalidCompany, UsrLastAdmin, UsrLoginExhausted, UsrLoginProhibited, UsrLoginExist, UsrSuicide, UsrInvalidPassword, UsrLimitReached, UsrHasTrades, UsrDifferentServers, UsrDifferentCurrency, UsrImportBalance, UsrImportGroup, UsrAccountExist, UsrImportAccount, UsrImportPositions, UsrImportOrders, UsrImportDeals, UsrImportHistory, UsrAPILimitReached, TradeLimitReached, TradeOrderExist, TradeOrderExhausted, TradeDealExhausted, TradeMaxMoney, TradeDealExist, TradeOrderProhibited, TradeDealProhibited, TradeSplitVolume, ReportSnapshot, ReportNotSupported, ReportNodata, ReportTemplateBad, ReportTemplateEnd, ReportInvalidRow, ReportLimitRepeat, ReportLimitReport, HstSymbolNotfound, RequestInWay, RequestAccepted, RequestProcess, RequestRequote, RequestPrices, RequestReject, RequestCancel, RequestPlaced, RequestDone, RequestDonePartial, RequestError, RequestTimeout, RequestInvalid, RequestInvalidVolume, RequestInvalidPrice, RequestInvalidStops, RequestTradeDisabled, RequestMarketClosed, RequestNoMoney, RequestPriceChanged, RequestPriceOff, RequestInvalidExp, RequestOrderChanged, RequestTooMany, RequestNoChanges, RequestAtDisabledServer, RequestAtDisabledClient, RequestLocked, RequestFrozen, RequestInvalidFill, RequestConnection, RequestOnlyReal, RequestLimitOrders, RequestLimitVolume, RequestInvalidOrder, RequestPositionClosed, RequestExecutionSkipped, RequestInvalidCloseVolume, RequestCloseOrderExist, RequestLimitPositions, RequestRejectCancel, RequestLongOnly, RequestShortOnly, RequestCloseOnly, RequestProhibitedByFifo, RequestHedgeProhibited, RequestReturn, RequestDoneCancel, RequestRequoteReturn, ErrNotImplement, ErrNotMain, ErrNotSupported, ErrDeadlock, ErrLocked, MessengerInvalidPhone, MessengerNotMobile, SubsNotFound, SubsNotFoundCfg, SubsNotFoundUser, SubsDisabled, SubsPermissionUser, SubsPermissionSubscribe, SubsPermissionUnsubscribe, SubsRealOnly, SubsPaymentMethod, PayRealOnly, PayInvalidAmount, PayNotAllowedDeposit, PayNotAllowedWithdrawal, PayNotAllowedGroup, PayNotAllowedCountry, PayDeclineByRules, PayDeclineByAml, PayLimitDepositMin, PayLimitDepositMax, PayLimitWithdrawalMin, PayLimitWithdrawalMax, PayProviderPayment, PayProviderStatus, PayConversion, PayNotWaiting, PayVerification, PayInvoice, PayInvalidCurrency, PayLimitReached, PayProviderRefund, PayDeclineByCardholderName

MT5ResultType

type of error described here

Values: HTTP, MT4API, MT5API