During the past few months I have been creating some EAs in MQL5. I have also created some microservice like functions for other FinTech related projects (e.g. Market News / custom indicators). All those services are exposed with REST APIs. So there is the need to reuse this functionality from MQL5 Expert Advisors.
There are numerous examples in MQL5 that use WebRequest, however it’s not possible to use them from within backtesting. An error is raised in such cases. The other obvious alternative was to use a custom DLL that will be used from within MQL5 and delegate the REST call to the DLL.
In this direction I have created an opensource library rest-mql and an example on how to use it through MQL5. The library can be found here: https://github.com/cyrus13/rest-mql
The example MQL code can be found here: https://github.com/cyrus13/rest-mql/blob/master/mql5-sample-code/testmqldll.mq5
It is worth mentioning that REST calls certainly slow down the EA and should be used judiciously.