API CONNECT - WEBREQUEST PROBLEM

Other Integration MySQL PHP

Job finished

Execution time 17 hours
Feedback from employee
A great experience. I'd be happy to work with you again.
Feedback from customer
Vitor did an excellent job and quickly. He is also a person who can express himself very well and this facilitated the completion of the project. I wholeheartedly recommend this developer.

Specification

Hello!


I'm having trouble putting together the code to connect to a database and control a query.

I created this code through some queries but I have an error when complicating code 4029.


void Check()

  {

   string uri = "END_POINT_API";

   char post[100];

   char result1[100];

   string headers;

   string APIKEY = "";

   string LICENCEKEY = "";

   int res;

   string signal = "?api_key=" + APIKEY + "&license_key=" + LICENSEKEY;

   StringToCharArray(signal, post);


// Construct the request headers

   headers = "Content-Type: application/json";  // Set the correct header format


// Reset last error

   ResetLastError();


// Post data to REST API

   res = WebRequest(

            "POST",

            uri,

            headers,        // Pass headers as a string

            10,             // Timeout in seconds

            post,

            result1,        // Store the response in result1

            headers         // Response headers (optional)

         );


// Check errors

   if(res == -1)

     {

      int error_code = GetLastError();

      string error_msg = ErrorDescription(error_code);

      Print("Error in Webquest. Error Code ",error_code," Error ",error_msg);

      if(error_code==4060)

        {

         MessageBox("Add address '"+uri+"' in Expert Advisors tab of the Options window", "Error", MB_ICONINFORMATION);

        }

      else

        {

         // Successful

         Print("REST client's POST: ", signal);

         Print("Server response: ", CharArrayToString(result1, 0, -1));

        }

     }

  }

//+------------------------------------------------------------------+


Below is the documentation of the API in which I want to query and with the result I will search for some information to validate the license of my products.



It is important to mention that I inserted my end-point in the metatrader 4 options, ruling out that this is why the connection problem occurred.



Responded

1
Developer 1
Rating
(42)
Projects
49
47%
Arbitration
1
100% / 0%
Overdue
1
2%
Free
Published: 1 code
2
Developer 2
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
3
Developer 3
Rating
(19)
Projects
27
26%
Arbitration
2
0% / 100%
Overdue
2
7%
Free
4
Developer 4
Rating
(26)
Projects
34
29%
Arbitration
0
Overdue
1
3%
Free
5
Developer 5
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
Hi, I need NinjaTrader 8 Strategy Analyzer backtests on two of my strategies, each over 1 year AND 3 years of data. Please quote the full job. Common settings: NT8 Strategy Analyzer, MCL (Micro WTI Crude Oil) continuous front-month contract (MCL ##-##), 5-minute bars, 1yr + 3yr of the most recent data, $2.50 round-turn commission per contract. Deliverables per run: full Strategy Analyzer summary (net profit, profit
I need a trading system similar to the attached files. Check attachment for details on the indicator. i guess the indicator contains some of (Rainbow MA , MTF Dashboard , Symbol Switcher , and Trend Histogram), though may not be exactly as listed

Project information

Budget
30+ USD