28.03.2026
- Connection state monitoring: all 4 platform components (MT4 Manager, MT4 Pump, MT5 Manager, MT5 Pump) now correctly report Connected/Disconnected status. Previously only MT4 Pump transitions were tracked; disconnect notifications for the other 3 components were silently skipped.
27.03.2026
- Fixed RabbitMQ message deserialization failure. Messages compressed with GZip by upstream services are now correctly decompressed before processing. Both compressed and uncompressed messages are supported transparently.
17.03.2026
GET /api/TradePlatforms,GET /api/Organizations— server-side response caching (1s TTL). Repeated requests return cached data with significantly lower latency.
10.03.2026
- MT4 pumping: attempt to fix delays on User/Trade/MarginCall updates caused by native pump thread saturation. All event processing now offloaded from native pump thread immediately, preserving strict FIFO event ordering.
08.03.2026
- MT5 SDK updated from
4755to5660:UsersPasswordsenum: addedTraderpassword type (for separate trader password distinct from main login password)MT5DealDTO: addedPartyIDfield (counterparty identification for ECN/exchange deals)MT5OrderDTO: addedPartyIDfield (counterparty identification)
18.01.2026
- MT5 added:
- POST
DealerBalanceRaw- raw balance operation that bypasses standard credit/margin validation checks (for administrative corrections)
- POST
28.03.2025
- WebAPI runs on top of .NET v9.0
28.11.2024
- MT5 added:
- POST
OrderDeleteBatch - POST
DealDeleteBatch - POST
PositionDeleteBatch
- POST
13.08.2024
- added
MT5AccountMarginCallEventArgs StreamMarginCallUpdates(TradePlatformId)method toMT5hub to monitor MC/SO events. Every time something happen on server, you will receive structure which JS object has self-explanatory example below:
account: {
"login": 2009,
"currencyDigits": 2,
"balance": 3025.7,
"credit": 0,
"margin": 3279.67,
"marginFree": 6.03,
"marginLevel": 100.18385996152051,
"marginLeverage": 100,
"profit": 386,
"storage": 0,
"floating": 386,
"equity": 3285.7,
"soActivation": "None",
"soTime": null,
"soLevel": 0,
"soEquity": 0,
"soMargin": 0,
"blockedCommission": -126,
"blockedProfit": -185428,
"marginInitial": 0,
"marginMaintenance": 0,
"assets": 0,
"liabilities": 0
}
type: "MarginCall"
direction: "Leave"
Direction can be Enter or Leave, Type can be MarginCall or StopOut.
26.06.2024
- in MT5 user's
rightsenumerable, added missing values, so JSON parser will be ok;
03.06.2024
- MT5 added:
- GET
HistoryRequestByGroup - POST
HistoryRequestByTickets - POST
OrderRequestByTickets - POST
DealRequestByTickets
- GET
31.05.2024
- MT5 order's
ActivationFlagsfield type switched fromuinttoTradeActivationFlagstype;
03.05.2024
- js libs to reference (to match client's SignalR libs with server):
- https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js
- https://cdnjs.cloudflare.com/ajax/libs/microsoft-signalr/6.0.25/signalr.min.js
- slightly reduced latency during SignalR events;
- added methods to MT5 controller:
DealRequestByGroupDealRequestByGroupSymbolOrderGetByGroupOrderGetBySymbolOrderRequestByGroupOrderRequestByGroupSymbolPositionGetByGroupPositionGetBySymbol
15.03.2024
SymbolUpdateadded toMT5controller;
15.03.2024
- all MT5 enums now serialized as string, instead of int/bitMask;
- including MT4's
AggregationType; - to
OrderFillingenumBoCadded,FOKandIOCrenamed toFoKandIoC; OrderTimeGTC->GtC;OrderActivationStoplimit->StopLimit,Stopout->StopOut;UsersRightsTechnicalandExcludeReportsenums added;- MT5 manager API b4230 support;
22.01.2024
- MT5 ManagerAPI b4150;
Retcodereplaced withRetCodewhere applicable;- added
DealUpdatemethod to MT5 controller;
24.11.2023
- fixed mistake in
SubscribeToTicks,SubscribeToAllTicks,UnsubscribeFromAllTicks.
22.11.2023
- added to MT5:
UserGetByLoginsPositionGetByTicketsGroupGetGroupRequestGroupRequestArrayOrderGetOrderGetByTicketsOrderGetByLoginsDealRequestByTicketsDealRequestByLoginsDealRequestByTicket
21.11.2023
- added to MT5:
ChartRequestSymbolGet- Instead of date
01.01.1970-nullwill be returned, where date time is nullable field; SymbolRequestArray
- MT5 Hub:
SubscribeToSymbolsOnSymbolandOnSymbolSynccallbacks;
UnsubscribeFromSymbolsSubscribeToTicks,SubscribeToAllTicksOnTickcallback;
UnsubscribeFromAllTicks
10.11.2023
- added streams to MT5 hub:
SubscribeToPositionsSubscribeToOrders
07.11.2023
- MT5
UserAdd: If any of passwords (PasswordorPasswordInvestor) is null or empty, both of them will be generated. We will generate passwords and call manager api method to create user. If MT5 does not like our password, we will try again with a new pair, a maximum of 10 times; - MT5
ManagerCurrentreturns updated structure signature;
07.11.2023
- MT5 methods added:
PositionGetByLogins
- reduced usage of MetaQuotes's
SMTTimein favor of default .NETDateTimeto/fromUnixTime/FILETIMEconverter;
30.10.2023
- Added methods to MT5 hub:
SubscribeToUsers, updates will be sent through callback(-s):OnUser
UnsubscribeFromUsersSubscribeToDeals, updates will be sent through callback(-s):OnDealOnDealClean
UnsubscribeFromDeals
28.10.2023
- MT5 API methods added:
UserDeleteClientDeleteUserGetByGroup
22.09.2023
- MT5 methods added:
TimeGetManagerCurrentUserAccountRequest
18.07.2023
- MT5
DealerSendresponse signature changed;
14.06.2023
- added
UserAccountGetmethod toMT5controller;
08.05.2023
UserUpdatenowPOSTmethod;- fixed problems with MT5 connectivity;
MT5ClientrequiresPersonName;
05.05.2023
MT5controller: addedTimeServermethod;- rewritten MT5 keep connection alive routine;
11.04.2023
- MT5 managerAPI used: b3661;
- added
UserUpdate,UserPasswordCheckandUserPasswordChangeMT5 methods.
21.03.2023
- added
ServerTimemethod to MT4 endpoint;
15.01.2023 SignalR MT4 HUB major update
- MT4 connection will stay alive after first access forever;
Connectmethod supportsConnectArgsstructure where you can specifyTimeoutMs, in milliseconds (30 seconds by default). You shall start your duties from this method;SetTicksAggregationSettings- not yet available;SubscribeToAllMarginUpdates- not yet available;UnsubscribeFromAllMarginUpdates- not yet available;UnsubscribeFromMarginUpdates- not yet available;SubscribeToMarginUpdates- not yet available;StreamMarginDiff- not yet available;Pingremoved, useConnectinstead;
MT4 Hub migration guide:
All methods awaits structure and send structures.
Because of guide
Old code:
connection.invoke("SubscribeToTicks", tradePlatform, "EURUSD")
New code:
connection.invoke("SubscribeToTicks", {tradePlatform, symbol: "EURUSD"})
All callbacks now return structures.
Old code:
connection.on("onTick", function (tradePlatform, tick) {
/* your code here */
});
New code:
connection.on("onTick", function (args) {
const {tradePlatform, tick} = args;
/* your code here */
});
Check CPlugin.WebAPI.Realtime.ts for further details.
28.12.2022
- [fix]
StreamTradessent updates for all platforms, regardless of chosen one; - [fix]
StreamUserUpdatessent updates for all platforms, regardless of chosen one;
20.12.2022
RefreshAPImethod removed from/TradePlatformscontroller.
14.12.2022
- added
TradesGetByLoginmethod to MT4 RESTful
14.12.2022 StreamMarginDiff
- IAsyncEnumerable -> ChannelReader;
- SamplingMs min is 0;
- added to MarginLevelDiff - Tm field;
- dont enqueue more records, until buffer completely flush;
24.11.2022
StreamUserUpdatesreturnsUserUpdatestructure which is
public class UserUpdate
{
public TransactionType Type;
public UserRecord User;
}
22.11.2022
- added
StreamMarginDiffto MT4 hub;
21.11.2022
- added
StreamUserUpdatesto MT4 hub;
16.11.2022
- [fix] when manager account does not hav enough right it will not throw exception anymore, but will return
{
"errorType": "MT4API",
"errorCode": "NotEnoughRights",
"errorDescription": "Not enough rights",
"requestId": "unique id"
}
JournalRequest,TradeRecordsRequest,TradesUserHistory,CfgRequestSymbol,AdmBalanceCheckfunctions will not throw exception but will returnBadRequestif manager account does not have enough rights;
13.10.2022
- fixed memory leakage during SignalR operations;
12.10.2022
- added method to MT4 hub:
IAsyncEnumerable<TradeExEventPayload> StreamTrades(Guid tradePlatform)
29.09.2022
- added method to MT4 hub:
bool Connect(Guid tradePlatform) - MT4 hub's callback
OnMT4ConnectionStatuswill only be run once status changed, and never during connect to hub;
23.09.2022
- [fix] problem with MT4::UserRecordNew
21.09.2022
Connectmethod removed from MT4 hub;- configurable
KeepConnectionAliveDuringparameter; - [fix] problem with disconnecting inactive trade platform even when signalR client still online;
15.09.2022
- added
DealerBalanceMT5 method - added
ClientRequestMT5 method - added
UserRequestMT5 method
13.08.2022
- SignalR
Tickstructure gotLastTimefield
08.08.2022
- added
StreamMarginCallUpdatesmethod to stream margin call updates. During subscription you get all accounts in M/C state. Then, only updates will be send (mc->normal and normal->mc). Code example is here
04.08.2022
- added auth support into swagger doc UI
- added
StreamAllTicksmethod to the MT4 hub, read more here
03.08.2022
- MT4 call added
CfgRequestSymbolGroup, more info here
21.07.2022
- MT5's call added
ClientAdd
20.07.2022
- MT5's calls
HistoryRequest,DealRequestreturn customized enums DealerSendcall now use customized enums, so call with parameters{"Login":2000, "Action": "TA_DEALER_POS_EXECUTE", "Symbol":"EURUSD", "Volume":100, "Type": "OP_BUY", "PriceOrder": 1.01}will not work, please convert arguments to the new format{"Login":2000, "Action": "DealerPosExecute", "Symbol":"EURUSD", "Volume":100, "Type": "Buy", "PriceOrder": 1.01}- Added
UserAddmethod
13.07.2022
- added
DealRequestMT5 method
13.07.2022
- all enums will be serialized as strings
11.07.2022
- added method
HistoryRequestto MT5 controller
01.03.2022
- API documentation augmented
28.02.2022
- added
TestController::TryParseDateTimeto test .NET DateTime parser values validity; - possible memory leakage fixes;
- added
/healthzURL endpoint to tell the status, possible values are (HTTP Code, string):[{200,Healthy}, {200,Degraded}, {503,Unhealthy}]; - V2 endpoint removed. There is a way to share error details even when we return 404 NOT FOUND (MT4/MT5 resource not found);
- Swagger/OpenAPI documentation updated: methods grouped by entity type, added description of 400,404 results, where applicable;
14.02.2022
- added 'CfgRequestSymbol', 'CfgRequestSymbol/{symbol}' methods to MT4 controller;
- fixed problem with
UserRecordsRequestmethod;
v1.3 (09.02.2022)
- migrated to .NET 6.0;
- if connection to MT4 was not used during past 15 minutes - it will disconnect from MT4 to reduce load;
v1.2 (17.11.2021)
- migrated to .NET 5.0;
api-versionpassed within query string not supported anymore, to specify api version. Use URL path instead;- added
v2api endpoint;
18.10.2021
- fixed problem when trade platform settings updated and WebAPI still used old credentials;
- use MT4 mtmanapi v1320
- performance optimization
28.06.2021
- added aggregation of price stream,
SignalR::MT4hub now have methodSetTicksAggregationSettings. Take a look to demo page source code to get example of use.
1.1.2
- WebAPI subscribed to updated ManagerAPI method
OnlineExChanges(OnlineExwere used before), which is now distinct against changes.
1.1.1.10
- added
void SubscribeToOnlineUpdates(Guid tradePlatform),void UnsubscribeFromOnlineUpdates(Guid tradePlatform)to MT4 hub and correspondingOnOnlineUpdate(Guid tpConnectionKey, TransactionType transactionType, int login)callback. - added signalr example links to main page
1.1.1.9
- added
UserRecordsRequestandUsersRequestmethods toMT4controller
1.1.1.7
- native MT4ManagerAPI updated to b1310
1.1.1.6
- minor update
1.1.1.5
- updated MT4 ManagerAPI wrapper to version 4.1260.1.8. If MT4 server DNS name cannot be resolved, it will try again using longer periods after each failed step, to avoid spamming journal.
1.1.1.2
- added "CfgUpdateSymbol" and "SymbolsRefresh" methods
1.1.1.1
- MT4 hub will notify SignalR consumers about current MT4 pumping status
1.1.1.0
- ManagerAPI pool ceased
1.1.0.24
- cached responses now in lower case, to match application standards
1.1.0.23
- added support for cached responses to make requests idempotent
at any URL it can be addedcacheIdofGuidtype,
andcacheTimeoutspecifying timout in seconds.
Example:/API/MT4/{mt4id}/JournalRequest/2020-08-01/2020-09-20/Full?cacheId=63cb3a5f-1bd6-445d-8da8-1b3d8a6ce70d&cacheTimeout=60
Next time ifcacheIdspecified, it will search in DB for cached record associated for this ID, if found - will return cached data instead.
AftercacheTimeoutseconds record will be deleted from DB permanently and will not be available.
1.1.0.21
- added API methods execution time logging
1.1.0.20
- performance optimization
1.1.0.19
- when there were no open trades, by mistake,
OnMarginUpdateHub method returned zero balance
1.1.0.18
- added
UnsubscribeFromMarginUpdatestoMT4Hub
1.1.0.17
- added method
MT4::JournalRequest
1.1.0.16
- minor updates
1.1.0.15
- [fix] mistake when
MT4HubcalledOnMarginUpdatecallback with empty list even client did not subscribe for it
1.1.0.14
- internal code optimization
1.1.0.13
Hubs:MT4margin level will be sent for all subscribed users, if subscribed explicitly, does not matter if there any open positions. Or if subscribed to all data, it will send for those accounts who have open positions.
1.1.0.12
- by default, MT platform connection timeout now 30 seconds. (previously was 1..5 in different places)
- added
MT4::ManagerCommonandMT4::ManagerCommonExmethods - x64 runtime
1.1.0.11
- SignalR endpoint rewritten to run under ASP.NET Core
- There is two example webpages: [simple test] and [MT4 demo], check their page source code to get the idea
- typescript example included
MT4::AdmBalanceChecklogin to be specified as ofAdmBalanceCheck/<login>MT4::AdmBalanceCheckalways return value of typeAdmBalanceCheck(in comparison to ManagerAPI which does not return anything, if balance is ok)MT4::AdmBalanceChecknow supports only single login specified within URIAdmBalanceCheck/{login:int:min(1)}MT4::AdmBalanceFixnow supports only single login specified within URIAdmBalanceCheck/{login:int:min(1)}
1.1.0.10
- fixed possible memory leaking problem making app crash unexpectedly
1.1.0.9
- fixed problem with
MT4::UserRecordNewcall result, passwords were suffixed with\0characters
v1.1.0.8
- slightly reduced memory usage
- performance significantly tuned up
MT4::UserPasswordSetnow requiresUpdatepermission, instead ofRequestMT4::UserRecordNewAPI method accept and return structure of typeUserRecordNewwhere password and password investor presented in plain text, and only once. Following requests of user settings will return both passwords stored in base64- Added
MT4::AdmTradeRecordModifymethod - added
MT4::AdmBalanceCheckandMT4::AdmBalanceFixmethods
v1.1.0.7
- added
GETmethod for MT4MarginLevelRequestwhich does not require pumping and does not need open trades to return a result (in comparison toMarginLevelGet)
v1.1.0.6
- significant request execution speed gain [link to our blog]
v1.1.0.5
- [fix] issue with applying new MT4 settings after update.
v1.1.0.4
- starting from now TickInfoLast will not make any calls to MT4, it will return internal buffer instead. But, if you want to collect prices you should add symbol to watch list by
making a very single call to
SymbolAdd. Then during whole WebAPI runtime it will collect prices for you into internal buffer. Keep in mind, this is not a history, only most recent prices for each explicitely monitored symbol. By default, symbol will be in market watch when there are open trades on it. Otherwise, you will not see prices until add symbol to watch list. - now there are two methods :
TickInfoLast/{symbol}- request prices for specified symbol onlyTickInfoLast- request prices for all monitored symbols
v1.1.0.3
- added
GET MT4/<id>/TickInfoLast - added
GET MT4/<id>/TicksRequest - added
GET MT4/<id>/ChartRequest
v1.1.0.2
- added
POST API/MT4/<id>/CfgUpdateGroup - added
POST API/MT4/<id>/UserRecordUpdate
v1.1.0.0
- source code migrated to asp.net core 2.1
- OData endpoint will not be served anymore. RESTful JSON WebAPI will take place
/odata/[controller]({id})should be redirected to `/api/[controller]/{?id}
v1.0.0.72
- fixed issue with wrtong error message returned while being not authenticated.
v1.0.0.71
- makes possible for: /odata/MT4Users(1000)/NS.MarginLevelGet()?`$select=Margin,Free
v1.0.0.67
- added very first support of MT5 platform
- added
POST /odata/TradePlatforms({Id})/NS.MT5DealerSendto send trade request to MT5 server - now it notice MT4/MT5 settings updates came from Admin portal to reconnect with new credentials