PHPackages                             aleedhillon/meta-five - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. aleedhillon/meta-five

ActiveLibrary[API Development](/categories/api)

aleedhillon/meta-five
=====================

Metatrader 5 Web API Wrapper for Laravel

v1.1.1(2y ago)332.7k—0%20MITPHP

Since Feb 20Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/aleedhillon/meta-five)[ Packagist](https://packagist.org/packages/aleedhillon/meta-five)[ GitHub Sponsors](https://github.com/aleedhillon)[ RSS](/packages/aleedhillon-meta-five/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Meta Five
---------

[](#meta-five)

This is Laravel 8.x + package wrapper library for Metatrader 5 Web API

- [Official MT5 Web Api Documentation](https://support.metaquotes.net/en/docs/mt5/api/webapi).

Ready-Made CRM Solution for MetaTrader 5
----------------------------------------

[](#ready-made-crm-solution-for-metatrader-5)

Looking for a comprehensive, ready-made CRM solution for the MetaTrader 5 platform? Look no further! We offer a robust MT5 CRM system designed to efficiently manage client data, interactions, and services.

### MT5 CRM Features:

[](#mt5-crm-features)

- **Client Onboarding:** Streamline the process of registering and managing new clients.
- **Communication Tracking:** Keep detailed records of client communications to improve service and satisfaction.
- **Reporting Tools:** Generate insightful reports to enhance productivity and client satisfaction.
- **Inter-Account Transfers:** Facilitate seamless transfers between accounts.
- **Manual and Automatic Payment Gateways:** Manage deposits and withdrawals from MetaTrader trade accounts effortlessly.
- **Top-Ups and Bonuses:** Easily manage top-ups and bonuses for your clients.
- **Public Website Management:** Customize and manage your public website through the admin panel.
- **Web Trader:** Offer a web-based trading platform for your clients.
- **Introducing Broker Features:** Implement different commission levels for introducing brokers.
- **User and Trade Accounts Management:** Comprehensive tools to manage all user and trade accounts.

Our MT5 CRM is designed to boost your brokerage's efficiency and client relations. If you're interested in a turnkey CRM solution, a demo can be provided upon contact.

### Contact Information:

[](#contact-information)

- **Email:** \[\]

For more details or to purchase the ready-made CRM, please reach out to us!

Documentation
-------------

[](#documentation)

### Packagist

[](#packagist)

.

### Installing

[](#installing)

To install the package, in terminal:

```
composer require aleedhillon/meta-five

```

### Configure

[](#configure)

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
AleeDhillon\MetaFive\MetaFiveProvider::class,

```

#### Copy the package config to your local config with the publish command:

[](#copy-the-package-config-to-your-local-config-with-the-publish-command)

```
php artisan vendor:publish --tag=meta-five-config
```

and then you can configure connection information to MT5 with this `.env` value

```
MT5_SERVER_IP=
MT5_SERVER_PORT=
MT5_SERVER_WEB_LOGIN=
MT5_SERVER_WEB_PASSWORD=
```

Usage
-----

[](#usage)

### Create Deposit

[](#create-deposit)

You can withdraw money by giving negetive number to the same `trade` method.

```
use AleeDhillon\MetaFive\Entities\Trade;
use AleeDhillon\MetaFive\Facades\Client;

$trade = new Trade();
$trade->setLogin(6000189);
$trade->setAmount(100);
$trade->setComment("Deposit");
$trade->setType(Trade::DEAL_BALANCE);
$result = Client::trade($trade);
```

The result variable will return Trade class with ticket information, you can grab ticket number by calling `$result->getTicket()`

### Create User

[](#create-user)

```
use AleeDhillon\MetaFive\Entities\User;
use AleeDhillon\MetaFive\Facades\Client;

$user = new User();
$user->setName("John Doe");
$user->setEmail("johndoe@example.com");
$user->setGroup("demo\demoforex");
$user->setLeverage("50");
$user->setPhone("0123456789");
$user->setAddress("Lahore");
$user->setCity("Lahore");
$user->setState("Punjab");
$user->setCountry("Pakistan");
$user->setZipCode(1470);
$user->setMainPassword("secret");
$user->setInvestorPassword("secret");
$user->setPhonePassword("secret");

$result = Client::createUser($user);
```

### Get Trading Account Information

[](#get-trading-account-information)

```
use AleeDhillon\MetaFive\Facades\Client;

$user = Client::getTradingAccounts($login);

$balance = $user->Balance;
$equity = $user->Equity;
$freeMargin = $user->MarginFree;
```

### Get Trading History By Login Number

[](#get-trading-history-by-login-number)

```
use AleeDhillon\MetaFive\Facades\Client;

// Get Closed Order Total and pagination
$total = Client::getOrderHistoryTotal($exampleLogin, $timestampfrom, $timestampto);
$trades = Client::getOrderHistoryPagination($exampleLogin, $timestampfrom, $timestampto, 0, $total);
foreach ($trades as $trade) {
    // see class MTOrder
    echo "LOGIN : ".$trade->Login.PHP_EOL;
    echo "TICKET : ".$trade->Order.PHP_EOL;
}
```

### Open Order

[](#open-order)

```
use AleeDhillon\MetaFive\Facades\Client;
Client::dealerSend([
    'Login' => 8113,
    'Symbol' => 'XAUUSD',
    'Volume' => 100,
    'Type' => 0
});
```

The result variable will return User class with login information, you can grab login number by calling `$result->getLogin()`

### Todo

[](#todo)

- Deposit or Withdrawal
- Create Account
- Open Order
- Get Trading Account Information
- Change Password
- Create Group
- Delete Group
- Get Accounts
- Remove Account
- Get Trades
- Get Group

This is work in progress, I will may be improve this package or rewrite the entire one with Laravel 9 and PHP 8 Support. In this revisioin I haven't touched much to the core in next I intend to rewrite the core.

Credits
-------

[](#credits)

Thanx to [Tarikh Agustia](https://github.com/tarikhagustia) who wrote the following two packges from which I have rewritten this current package with improvements like the Laravel singleton pattern for speed and reducing API calls to MT5.

-
-

Contributing
------------

[](#contributing)

Thank you for considering contributing to the MetaFive! you can fork this repository and make pull request.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within MetaFive, please send an e-mail to Ali A. Dhillon via [aleedhx@gmail.com](aleedhx@gmail.com). All security vulnerabilities will be promptly addressed.

License
-------

[](#license)

The MetaFive packge is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance50

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~406 days

Total

3

Last Release

735d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f40cc47c8f3234ac35cab796d68f04e110c52c3c79a72cc2ec2163ea8e9d2b3?d=identicon)[aleedhillon](/maintainers/aleedhillon)

---

Top Contributors

[![aleedhillon](https://avatars.githubusercontent.com/u/13802089?v=4)](https://github.com/aleedhillon "aleedhillon (12 commits)")

---

Tags

crmforexforex-tradinglaravelmetaquotesmetatrader-5mt5mt5-apimt5webapiphp

### Embed Badge

![Health badge](/badges/aleedhillon-meta-five/health.svg)

```
[![Health](https://phpackages.com/badges/aleedhillon-meta-five/health.svg)](https://phpackages.com/packages/aleedhillon-meta-five)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
