An open-source Laravel client for MetaTrader 5
A Laravel package wrapping the MetaTrader 5 Web API — refactored from vanilla PHP to OOP, with Singleton-based connection handling to minimize API requests. Powers production back-offices serving 10,000+ live trading users.
The brief
The MetaTrader 5 Web API is powerful but unfriendly — a thin XML-over-HTTP surface designed for low-level integration. Every brokerage we worked with ended up writing the same wrapper code, badly. So we wrote it once, opened it up, and kept maintaining it.
What we built
- Idiomatic Laravel package with the API surface mapped to typed PHP methods — accounts, positions, orders, deposits, withdrawals, copy trading, KYC.
- Singleton-based connection management so a single HTTP request reuses the MT5 session across many domain calls instead of hammering the server.
- Refactor of legacy procedural PHP into a clean OOP design with named exceptions, request/response DTOs, and a configurable transport layer.
- Documentation that lets a junior developer wire MT5 into a Laravel app inside an afternoon.
- Composer-installable — drops into any Laravel project, configurable via
.env.
Outcome
The package ships in production back-offices used by 10,000+ live trading users across multiple brokerages. The MetaTrader 5 PHP space had a missing piece, and this filled it.
Have a project like this?
Tell us about it. We respond within one working day with a written estimate or a calendar link.