Skip to content

dev4traders/laravel-mt4-sdk

Repository files navigation

An SDK to easily work with the MT4 API in Laravel apps

This package contains the PHP SDK to work with MT4.

Here are a few examples:

use D4T\Mt4Sdk\Facades\MT4Manager;

// creating a campaign
$account = MT4Manager::createAccount([
    'email' => '1@1.com',
    'name' => 'Test Name'
]);

Installation

You can install the package via composer:

composer require dev4traders/laravel-mt4-sdk

You must publish the config file with:

php artisan vendor:publish --tag="mt4-sdk"

This is the contents of the published config file:

return [
    /*
     *  You'll find both the API token and endpoint on Mailcoach'
     *  API tokens screen in the Mailcoach settings.
     */
    'api_token' => env('MT4_API_TOKEN'),

    'endpoint' => env('MT4_API_ENDPOINT'),
];

In your .env file you should add the entries from the config file mentioned above.

Usage

You can use the D4T\MT4Sdk\Facades\MT4Manager facade to perform most operations.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The MIT License (MIT). Please see License File for more information.