Guides · 8 min read · 2026-09-03
The MetaTrader REST and Web API: What Exists, What Doesn't
By MetaTrader API Editorial Team

Four things get called the MetaTrader API: MQL5, the Manager/Server API, the web platform and REST bridges. Who can get each, and which fits your build.
Short answer: MetaQuotes publishes no REST or Web API for retail MetaTrader accounts. There is no api.metatrader.com, no developer portal, and no documentation to read — which is why searches for "MetaTrader 4 Web API" and "MetaTrader 5 REST API" return so much noise. What exists is four separate things sharing one name, and only one of them is available to someone who is not a broker.
This page is the map. It will not sell you anything for the first thousand words, because the most common reason these integrations fail is that people pick the wrong layer before they start.
The four things called "the MetaTrader API"
1. MQL5 (and MQL4)
A C-like language for Expert Advisors and indicators that runs inside the MetaTrader desktop app. It can place orders, read prices and call out over HTTP with WebRequest.
Who can get it: anyone. Why it is usually the wrong answer: the code runs inside a GUI application that has to stay alive on a Windows machine. One MetaTrader install, one account, one desktop session. Scaling it means running N installations on N VPSes and babysitting all of them. It is a scripting layer for a chart, not backend infrastructure.
2. The Manager API and Server API
A C++/.NET library from MetaQuotes that gives near-root control of a trade server: create accounts, adjust balances, read every position on the platform.
Who can get it: brokers only. MetaQuotes licenses it to the entity that operates the trade server. If you are building a SaaS product on top of someone else's brokerage, you will not be given this, and no amount of asking changes that. If you searched for "MetaTrader 5 Gateway API" or "MetaTrader 4 Manager API documentation", this is what you found — and it is almost certainly not available to you.
That is worth saying plainly because a large share of the traffic to these terms is developers who spend a week trying to license something they were never eligible for.
3. The MetaTrader Web Platform (WebTrader)
MetaQuotes' browser-based trading UI. It is an interface for humans. There is no documented machine interface behind it, and driving it programmatically means scraping a UI that changes without notice.
Who can get it: anyone. Useful as an API: no.
4. A third-party REST bridge
A service that connects to your MetaTrader accounts on your behalf and exposes them as ordinary HTTPS and WebSocket. You authenticate with account credentials or a key, and you get JSON.
Who can get it: anyone. This is the only category that gives a retail-side developer a real REST API, and it is what this site provides.
So which do you need?
| What you are building | Layer |
|---|---|
| An indicator or EA for your own chart | MQL5 |
| A bot managing one account on your own desktop | MQL5, or a REST bridge if you want it off your machine |
| A SaaS that connects customers' accounts | REST bridge |
| A copy-trading or signal platform | REST bridge |
| A prop-firm dashboard watching many accounts | REST bridge |
| Your own brokerage, on your own trade server | Manager/Server API, from MetaQuotes |
The dividing line is simple: if you do not own the trade server, the Manager API is not an option, and everything else routes through either the MetaTrader app or a bridge.
What a REST layer for MetaTrader looks like
Whatever provider you pick, the shape is the same. A request carries a key and an account identifier:
curl -X GET \
"https://api.metatraderapi.net/AccountSummary?id=YOUR_ACCOUNT_ID" \
-H "x-api-key: YOUR_API_KEY"
and returns JSON rather than a desktop app window:
{ "balance": 10000.00, "equity": 10234.50, "margin": 500.00, "profit": 234.50 }
Streaming is a WebSocket rather than a polling loop, because quote data at any useful frequency is not something to poll.
The three things worth checking before you commit to any provider:
- Do you have to install or run anything yourself? If you must keep a MetaTrader installation or an EA running on your own machines, you have bought a hosting problem, not an API. With a hosted REST API there is nothing to install on your side and no EA for you to run.
- How is it billed? Per-request charges and per-feature add-ons get expensive precisely when your product succeeds. A known price per connected account, with streaming and both platforms included and a per-unit price that drops at volume, does not.
- What happens to a disconnected account? Reconnection behavior is the single most common source of production incidents in this category, and it is rarely documented. Ask.
Where the documentation actually is
There is no MetaQuotes REST documentation to find, which is why "MetaTrader 4 API documentation" and "MetaTrader 5 API documentation" are such frustrating searches. The documentation you want belongs to whichever bridge you use.
Ours is at app.metatraderapi.net/docs — endpoints, authentication, the WebSocket contract and the error semantics, in one place.
The short version
- MetaQuotes ships no public REST or Web API for retail accounts. Nothing you are failing to find.
- MQL5 runs inside the MetaTrader desktop app. Fine for one chart, wrong for a backend.
- The Manager and Server API is real, powerful and licensed to brokers only.
- A third-party REST bridge is the only route to HTTPS-and-JSON access to an existing MT4 or MT5 account, and the questions that matter are what you have to install and run yourself, the billing model and reconnection behavior.
If you want to see the shape of it against a live account, the documentation has the full endpoint list, and a newly connected account is usually ACTIVE within 1–2 minutes.
Ready to integrate the MetaTrader API?
REST, WebSocket and gRPC for MT4 and MT5. Pay per connected account.
Create account