PHP code example of dev4traders / mt4-sdk-php
1. Go to this page and download the library: Download dev4traders/mt4-sdk-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dev4traders / mt4-sdk-php example snippets
$manager = new \D4T\MT4Sdk\Manager('<api-key>', '<mt4-api-endpoint>')
// creating a account
$account = $manager->createAccount([
'email' => '[email protected]',
'name' => 'My new campaign'
]);
// listing all logins
$logins = $manager->accounts();
foreach($logins as $login) {
echo $login;
}
use D4T\MT4Sdk\Manager;
$manager = new \D4T\MT4Sdk\Manager('<api-key>', '<mt4-api-endpoint>')
composer test
bash
composer