Settings

Panel configuration and API integration

Script Configuration

••••••••••••••••••••••••••••••

Used as the secret key for license generation

API Integration

https://exness-014.pages.dev/api/validate
MQL5 Snippet
// Add to your EA OnInit()
input string LicenseKey = "";  // License Key

int OnInit()
{
   string url = "https://exness-014.pages.dev/api/validate";
   string accountId = IntegerToString(AccountInfoInteger(ACCOUNT_LOGIN));
   string server = AccountInfoString(ACCOUNT_SERVER);

   string jsonBody = "{\"accountId\":\"" + accountId
      + "\",\"server\":\"" + server
      + "\",\"key\":\"" + LicenseKey + "\"}";

   char post[];
   char result[];
   string headers = "Content-Type: application/json\r\n";
   StringToCharArray(jsonBody, post);
   int res = WebRequest("POST", url, headers, 5000, post, result, headers);

   if(res != 200) { Alert("License validation failed!"); ExpertRemove(); return(INIT_FAILED); }
   string response = CharArrayToString(result);
   if(StringFind(response, "\"valid\":true") == -1) { Alert("Invalid license!"); ExpertRemove(); return(INIT_FAILED); }
   Print("License validated!");
   return(INIT_SUCCEEDED);
}

How It Works

1

Subscriber sends you their Exness Account ID and Server name

2

You create a license in the Licenses page with their details

3

Send the generated license key to the subscriber

4

Subscriber enters key in bot. If valid → bot runs. Otherwise → bot stops