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.

Solicitudes similares
I am looking for an experienced MQL4/MQL5 developer to build a custom MT4 indicator from scratch or cracking my ex4 file that i provide to you. I already have an existing indicator (EX4) which produces highly accurate buy/sell signals. I want a similar indicator developed based on its observable behavior and signal structure. my existing indicator is pc id protected so you have to do PC ID security bypass and source
The Relative Strength Index (RSI) is a technical momentum indicator measuring the speed and change of price movements, scaled from 0 to 100 to identify overbought (>70) or oversold (<30) conditions. Developed by J. Welles Wilder Jr., it helps traders spot potential trend reversals or corrections.Imagine a stock, XYZ, is trending upwards.Overbought Signal: The price increases sharply, and the RSI rises to 75. This
I am looking for an experienced developer in MQL5 to build a fully AI and automated trading bot (Expert Advisor) for MetaTrader 5. The EA will trade XAUUSD only and will be based purely on price action and Smart Money Concepts (SMC), specifically focusing on liquidity sweeps, market structure shifts (MSS/CHoCH), and wick rejection entries at key points of interest (POIs). The system must follow a strict rule: no
We are looking for a developer to finish and stabilize an existing Kalshi trading bot (~60% complete) built in TypeScript. This is not a MetaTrader EA. The system interacts with the Kalshi API and requires strong understanding of execution logic, order handling, and state management. Scope of Work: Review and understand existing TypeScript codebase Complete missing functionality Fix execution issues (order placement
It must have automated stop loss. Something that can end poverty and kill the market early.It must take the trades for me whenever I start it it must work on tradeport ea