problems with webrequest function --> MQL5 and missed with the MQL5 service desk

 
Hi...
I do not know if you, people of the forum, have noticed that in the update of MT5 (1860) of June 15, the WebRequest function presented a very important fault, which made it very little functional.
as I am working with it, immediately report to the service desk presenting the flaw and attaching some scripts to prove the malfunction, comparing with the same function in MQL4, which fortunately has not been affected.
Well, in a brief response, they told me they were working on solving it and fortunately, in the 1870 update of July 26, the function was corrected.

Do not close my ticket because add an additional query = When will they allow "PUT" and "DELETE" in this function?

While it is true that I mentioned that in the 1870 update the function was at least better, I also noticed from the beginning that even with that update, the function had a small flaw. I did not report it, I was expecting an update with a correction but it did not arrive, so just 3 days ago I continued on the same ticket and raised the error I was noticing, and that is that in some answers that are received in the MQL5 webrequest , it does not show the real answer that really sends the counterpart.

As proof of this, send in the same ticket two scripts, one in MQL4, where a response is effectively received from the counterpart (binance, whom I want to buy without a sufficient balance), and in the other script, exactly the same code, but in MQL5, and where it is evident that the function does not receive the answer.

What I want to highlight is that not only did my ticket not respond to me, but they also eliminated my tickets that I have ever submitted, so I will not at least respond to this error, and also, when I want to present a new ticket, I will not I see the option to present it for programming language issues, but my only options to present tickets is by web page topics and payments.

I ask for your collaboration asking if you submit tickets for the language of the code and with this you can present this error again so that they can resolve it

I attach the scripts (compiled because this is my apikey) but I guarantee and I assure that it is the same code in each one. and a capture of the ticket options that I can present,

thanks to all
Files:
 
Hi please post the MQ4/5 files.
 
Marco vd Heijden:
Hi please post the MQ4/5 files.

I do not attach the code because it is not my problem,I am convinced that my code does not fail. it is an error in the function and it affects all the users, besides I have it with my api key and 4 includes files and I do not want to complicate it.

the idea is that it reaches the language developers, but I can not present a ticket and I have deleted the one that presents.

If the developers understand and do the tests, they will understand the error and they will fix it, not for me, for everyone.

You as moderator should suggest that you read this message, thank you

 

And here we are...


 
Alain Verleyen:

And here we are...


I do not understand how this can help, but if what you want is the code, here it is.


I hope then that with your tests, please, please, at least comment whether I am wrong or not, that there is a problem


It is the same code in MQL4 and in MQL5

#include <SHA256.mqh>
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
Print ("Start of tests -> send order to binance");
   char resultado[],data[];
   string headersResp;
   string PreConsulta;
   string METODO;
   string Firma="";
   string headersCons="";
   METODO="POST";
   PreConsulta="api/v3/order";
   string Consulta;

   Consulta="symbol="+"ZILBTC"+"&side="+"BUY"+"&type=MARKET"+"&quantity="+"500"+"&newOrderRespType=FULL"+"&newClientOrderId="+"abc123";
   Consulta=Consulta+"&timestamp="+CHECKTIME()+"&recvWindow=10000";

//****Obtencion de el Hash******  
   SHA256 hash256;

   string keystr="YOUR SECRET KEY HERE";
   string msgstr= Consulta;

   string resultadoSHA=hash256.hmac(msgstr,keystr);
//Print("Hash: "+hash.Str());
// **** FIN OBTENCION HASH***

   Firma="&signature="+resultadoSHA;
   headersCons="X-MBX-APIKEY: "+"YOUR API KEY HERE";

   string LineaFinal="https://api.binance.com/"+PreConsulta+"?"+Consulta+Firma;
//Print(LineaFinal);
   int res=WebRequest(METODO,LineaFinal,headersCons,10000,data,resultado,headersResp);
   string Resf=CharArrayToString(resultado);

   
/*int handle=FileOpen("MasMiguelllllle.txt",FILE_TXT|FILE_WRITE|FILE_READ);
   if(handle>0)
     {
      FileWrite(handle,Resf);
      FileClose(handle);
     }
     */
     Print("CodeResponse: ",res,"  - Size String response: ",StringLen(Resf)," - Response of Binance: ",Resf);
    Print ("End Test");
  }
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
string CHECKTIME()
  {
   char resultado[],data[];
   string headersResp;
   string METODO="GET";
   string Firma="";
   string headersCons="";

   int res=WebRequest(METODO,"https://api.binance.com/api/v1/time",headersCons,10000,data,resultado,headersResp);
   string Resf=CharArrayToString(resultado);
   return StringSubstr(Resf,14,13);
  }
//+------------------------------------------------------------------+
Files:
SHA256.mqh  8 kb
 
Miguel Antonio Rojas Martinez:
Hi...
I do not know if you, people of the forum, have noticed that in the update of MT5 (1860) of June 15, the WebRequest function presented a very important fault, which made it very little functional.
as I am working with it, immediately report to the service desk presenting the flaw and attaching some scripts to prove the malfunction, comparing with the same function in MQL4, which fortunately has not been affected.
Well, in a brief response, they told me they were working on solving it and fortunately, in the 1870 update of July 26, the function was corrected.

I don't use MQ4/5 for web-requests. I am using powershell and wget to load and parse the files - it can be easily organized by Windows' event scheduler and then I just load a csv.-file by mq4/5.

This way I am using 'spacialists' for that!