Requirements
Before installing the SDK, ensure your system meets the following requirements:- PHP: 7.4 or higher (including PHP 8.0+)
- PHP Extensions:
ext-curl- For making HTTP requestsext-json- For JSON parsingext-mbstring- For multibyte string handling
- Composer: For dependency management
The SDK uses Guzzle HTTP client for making API requests and supports both synchronous and asynchronous operations.
Installation Methods
You can install the MT5 Manager API PHP SDK using either of the following methods:Method 1: Using Composer Require (Recommended)
Run the following command in your project directory:This will automatically download the SDK and its dependencies.
Verify Installation
After installation, verify that the SDK is properly installed by checking yourvendor directory:
lib/- Core SDK classescomposer.json- Package configurationautoload.php- Composer autoloader
Autoloading
The SDK uses PSR-4 autoloading. Include Composer’s autoloader in your PHP file:Dependencies
The SDK automatically installs the following dependencies:Troubleshooting
Missing PHP extensions
Missing PHP extensions
If you encounter errors about missing PHP extensions, install them using:Ubuntu/Debian:macOS (using Homebrew):Windows:
Enable the extensions in your
php.ini file by uncommenting:Composer not found
Composer not found
Install Composer globally:Verify installation:
Version conflicts
Version conflicts
If you experience dependency conflicts, try:Or clear Composer’s cache: