Products
Full Forex Broker PackageWebsite, portals, API and MT5 from $999/mo Prop Fund Broker PackageChallenges, drawdown rules, certificates Forex CRMBroker management portal Traders CabinetClient portal with automatic payments CopyTraderMulti-broker MT4/MT5 copy trading MetaTrader Grey LabelYour own MT5 groups, live in 24 hours
API
MT5 Manager APISwagger-based REST API from $299 MT4 Manager APISwagger-based REST API from $299
Ready Brokers
ForexSTARReady-made white label broker for sale ForexBT (MT5)Ready MT5 broker with 5k free leads
Resources
BlogGuides on forex CRM, white label and prop firms Forex Broker GlossaryPlain-English definitions About PremiumSystemsWho we are and what we build
Contact Chat on WhatsApp Get a quote
Forex CRM & Technology

MT5 API for Brokers: Manager API, Web API, Server API and REST Explained

By PremiumSystems Team Published 6 min read
MT5 API for Brokers: Manager API, Web API, Server API and REST Explained

Quick answer: “MT5 API” usually means one of four things. The Manager API lets back-office software manage accounts, balances and trades. The Web API exposes server operations over HTTPS. The Server API is for plugins that run inside the trading server. A REST or Swagger wrapper sits on top of the Manager API so any web developer can use it. Most brokers building a CRM, traders cabinet or copy trading tool need the Manager API, ideally through a REST wrapper.

When a developer or a new broker says “we need the MT5 API”, the conversation often goes in circles because MetaTrader 5 does not have one API. It has several interfaces, each built for a different job and a different level of access. Picking the wrong one costs weeks: you end up writing a server plugin when a simple Manager connection would have done, or trying to run back-office automation through a trading terminal.

This guide is the version we wish someone had handed us years ago. It covers what each MT5 interface does, who it is for, and the questions to ask before you pay for access.

The four MT5 interfaces at a glance

Interface Runs where Typical use Who uses it
Manager API Your application, connecting to the MT5 server CRM, traders cabinet, reporting, copy trading Brokers and their tech vendors
Web API HTTPS calls to the MT5 server Lightweight account and balance operations from a website Brokers with in-house web teams
Server API Inside the MT5 server as a plugin Custom risk rules, routing, real-time trade logic Platform owners with server access
REST / Swagger wrapper A service between your app and the Manager API Same as Manager API, but in plain JSON over HTTP Any developer, any language

There is also the MetaTrader 5 Python package and MQL5 Expert Advisors. Both run against a trading terminal, so they are tools for traders and algo developers, not for running a brokerage. If your goal is creating accounts or crediting deposits, they are the wrong tools.

1. MT5 Manager API

The Manager API is the workhorse. It connects with manager credentials and can do almost anything a dealer could do in the MT5 Manager terminal, but from code:

  • Create trading accounts, set group, leverage and permissions
  • Deposit, withdraw, apply credit and bonus operations
  • Read open positions, orders, deals and full trade history
  • Subscribe to real-time events: new deals, balance changes, quotes
  • Reset passwords and change account settings

Everything a broker CRM does with the platform runs through this layer. When a client signs up in the traders cabinet and gets a live account in seconds, that is a Manager API call. The native SDK is C++ and .NET and needs a Windows environment, which is the main reason wrappers exist.

2. MT5 Web API

The Web API lets authorised applications talk to the MT5 server over HTTPS without the native Manager libraries. It covers common operations such as account management, balance operations and reading trade data. It is handy for simpler website integrations, but coverage and real-time event handling are more limited than a full Manager connection, so most serious back offices still rely on the Manager API underneath.

3. MT5 Server API (plugins)

The Server API is for code that runs inside the trading server: custom execution rules, automatic risk actions, routing logic, special swap or commission calculations. It is powerful and dangerous. A buggy plugin can affect every client on the server, and you need server-level access, which you will not have on a white label or grey label. If you are not the platform licence holder, plan around the Manager API.

4. REST and Swagger wrappers

A REST wrapper is a service that holds the Manager connection and exposes it as clean JSON endpoints with documentation, often in Swagger (OpenAPI) format. Your developers call POST /accounts or GET /deals from PHP, Node, Python or anything else, with no Windows dependency and no C++.

For most brokers this is the practical answer. It is how our own MT5 Manager API is delivered: a Swagger-documented interface starting from $299, used for account creation, deposits and withdrawals, trade history import and copy trading.

Which MT5 API do you need?

  • Building or connecting a forex CRM: Manager API, through a REST wrapper unless your team writes C++ or .NET. See forex CRM integrations.
  • Traders cabinet with instant accounts and deposits: Manager API.
  • Copy trading, MAM or PAMM: Manager API with real-time deal events. Our CopyTrader works this way, without slave terminals or trader passwords.
  • Prop firm challenge monitoring: Manager API for equity and drawdown checks, sometimes plus a Server API plugin if you own the server.
  • Custom execution or routing: Server API, only if you hold the platform licence.
  • A trading bot: not a broker API at all. Use MQL5 or the Python terminal package.

Questions to ask an MT5 API provider

  1. Is it a direct Manager connection, or does it poll and cache data?
  2. Which operations are covered: accounts, balance, credit, groups, history, quotes, events?
  3. Are real-time events pushed (webhooks or websockets), or do I have to poll?
  4. Is there full documentation I can test against before paying?
  5. How are credentials stored, and is every balance operation logged?
  6. Does it support MT4 too, in case I run both? Compare in MT4 vs MT5 Manager API.
  7. What happens when MetaQuotes ships a server update?

For the bigger picture on how brokers automate the platform, read MetaTrader API explained.

Frequently asked questions

Does MT5 have a REST API?

MetaQuotes provides the Manager API, Server API and a Web API for the trading server. Most brokers use a REST or Swagger wrapper built on the Manager API, which turns MT5 operations into simple JSON endpoints any developer can call.

What is the difference between the MT5 Manager API and the Server API?

The Manager API runs in your own application and connects to the server to manage accounts, balances and trades. The Server API runs inside the MT5 server as a plugin and can change how the server itself behaves. The Server API needs platform-level access.

Can I use the MT5 Manager API on a white label or grey label?

Usually yes, with manager credentials limited to your own groups. Server API plugins are normally not available because the provider controls the server.

How much does MT5 API access cost?

Pricing varies by provider and scope. Our Swagger-based MT5 Manager API starts from $299, and API access is included in the Full Forex Broker Package.

Is the MetaTrader 5 Python package a broker API?

No. It connects to a running trading terminal and is meant for traders and analysts. It cannot create accounts or process deposits for other clients.

Need MT5 automation without writing C++? Look at the MT5 Manager API or talk to us about your use case.

Related reading

Ready to launch your forex broker or prop firm?

Full broker package with MT5 included from $999 per month, limited-time free setup.

Chat on WhatsApp
WhatsApp Call Quote