FXSUPPORT

All servicesAboutContact
Bridges, CRM and integrations

MetaTrader API and MT5 Manager API integration for brokers

We connect your MetaTrader servers to the CRM, client portal, payment flows and reports your business runs on. The work is done with a manager login you control and is tested on a demo server before it touches live accounts.

For brokerages and companies. Replies come from an engineer, not a call centre.

Interfaces
Manager, Web, Server, Report and Gateway API
Platforms
MT5, and MT4 servers already in operation
Typical links
CRM, client portal, payments, reporting
Testing
Demo server first, then a staged go-live

Updated 22 October 2026By the FXSUPPORT engineering team

In short

MetaTrader API integration links an MT4 or MT5 server to a broker’s other systems through the interfaces MetaQuotes gives licensed brokers. The Manager API handles accounts, balances and trades. The MT5 Web API serves websites and portals. The Server API runs plugins inside the server, and the Gateway API connects MT5 to bridges and price feeds.

What is MetaTrader API integration?

MetaTrader API integration is the work of connecting your trade server to the software around it. Accounts, balances, trades and reports then move between systems without anyone copying them by hand. A CRM opens an MT5 account when KYC is approved. A payment callback posts a deposit to the right login. A risk dashboard reads open positions every few seconds. Each of these runs through an API that MetaQuotes supplies to licensed brokers.

MetaQuotes does not run these links for you. The platform is installed on the broker’s own infrastructure, and MetaQuotes says it has no access to servers, accounts or trading data. So the connector, the manager login it uses and the monitoring around it are your responsibility, or the responsibility of the team you hire.

We build and maintain these connectors as part of our MetaTrader support for brokers. FXSUPPORT is not affiliated with MetaQuotes or with any vendor named on this page.

“Manager API allows you to develop custom administration and management utilities, or even your own manager terminal. Web API is used for platform integration with web resources and other services of the company.”

MetaQuotes, MetaTrader 5 for brokers

Which MetaTrader server APIs exist and what does each one do?

MetaTrader has five broker-side interfaces, and each one runs in a different place. That location matters more than the feature list. A bug in an external Manager API service stops one integration. A bug in a server plugin can affect the whole trade server.

The table maps each interface to its usual job. The names differ slightly between platforms: MT4 calls its web interface the WebServices API and its feed interface the DataFeed API.

MetaTrader server APIs from a broker’s point of view
InterfaceMT5MT4Where the code runsTypical broker use
Manager APIYes (C++, ASP.Net, PHP)Yes (C++)Your own service, logged in as a managerCRM sync, account creation, balance operations, dealing tools
Web APIWeb APIWebServices APIYour web back endClient portal, registration, account data on a website
Server APIYesYesInside the trade or history server as a pluginCustom checks, commission logic, event hooks
Report APIYesYesReporting component of the platformCustom reports on accounts and financial operations
Gateway APIGateway APIDataFeed APIA gateway or feeder processBridges, liquidity routing and custom price feeds

Language support from the MetaQuotes MT5 vs MT4 comparison. API reference documentation is published in the MetaQuotes Support Center for licensed brokers.

What do brokers use the MT5 Manager API for?

The MT5 Manager API is the workhorse of most integrations. It lets an external program log in as a manager and do the jobs a person would do in the MT5 Manager terminal. That means creating and editing accounts, moving them between groups and changing leverage. It also covers balance and credit operations and reading trades, orders and positions.

MetaQuotes lists C++, ASP.Net and PHP for the MT5 Manager API, against C++ only on MT4. In practice most production connectors we see are C++ or .NET services that run all the time and keep one or more manager sessions open. A CRM back office then talks to that service rather than to MetaTrader directly.

The difficult parts are rarely the calls themselves. They are reconnection after a server restart, handling the flood of events after a busy market open, and making sure a deposit is never posted twice. We design each connector so that every money-moving operation carries a unique reference and can be checked against the server afterwards.

MT5 also gives you more balance operation types than MT4. MetaQuotes lists eight types on MT5. Bonus, Commission, Agent and Interest are among them. MT4 has only Balance and Credit. Mapping your CRM’s payment types to the right MT5 operation saves a lot of reconciliation work later.

When should you use the MetaTrader 5 Web API instead?

Use the MetaTrader 5 Web API when a website or portal needs account data and simple actions, and you do not want to run a permanent C++ or .NET service. MetaQuotes describes it as the interface for integration with web resources and other company services.

A typical example is a client area that shows each trader their logins, balance and history. It may also let them open a demo account. A web back end can do this over the Web API with a manager login that only reaches the groups it needs. Heavy work stays on the Manager API: high-volume event streams, dealing tools and bulk changes.

Many CRM vendors use both. Their portal reads through the Web API and their back office writes through the Manager API. When you evaluate a CRM, ask which interface each feature uses, because that decides which manager rights you must grant. Our forex CRM page covers that selection in more detail.

The MetaTrader5 Python package that many developers find first is a terminal-side library. It connects to an installed trading terminal, not to your server. A broker back end should use the Manager API or the Web API.

How does the MetaTrader 4 API work on existing servers?

The MetaTrader 4 API set is still in use on many broker servers. It has a Manager API in C++, a Server API for plugins, a DataFeed API, a Report API and the WebServices API for websites. MetaQuotes describes the Server API as the way to build server plugins that manage server parameters, the order and customer base, and trade requests.

You cannot start a new MT4 brokerage today. MetaQuotes states that MT4 licences are no longer available for purchase, so MT4 integration work is about keeping existing servers running. We maintain MT4 Manager API connectors and plugins for brokers who still serve MT4 clients.

An MT4 connector cannot simply be pointed at MT5. Account creation, group mapping and balance operations all behave differently, and MT5 removes the 512-group limit that MT4 has. If you are planning a move, budget for a rewrite and a parallel test period. Our MT4 to MT5 migration work includes moving these integrations.

What is the MT5 Gateway API in broker terms?

The MT5 Gateway API is how MetaTrader 5 talks to the outside market. MetaQuotes says it is used for integration with other trading systems and for creating custom data feeds. In broker terms, a gateway is the piece that takes an order from MT5 and sends it to a bridge or liquidity provider, and that brings prices back in.

Most brokers never write a gateway. They install one from their bridge vendor. PrimeXM, for example, calls its connector an MT5 Gateway. What the broker does need is a correct gateway configuration: symbol mapping, routing rules, session times and what happens when the connection drops.

The Gateway API is not the right tool for a CRM or portal. If a vendor proposes a gateway to sync client data, ask why. Bridge and liquidity work is covered on our MT4/MT5 liquidity bridge page, and FIX connections on FIX API integration.

Which integrations do brokers usually build first?

Most brokers start with the CRM and client portal, then payments, then reporting. The table shows the integrations we are asked for most and the point where each one usually breaks.

CRM and portal

Account creation after KYC, group mapping, password resets, statements and IB data. See forex CRM.

Payments

PSP callbacks turned into balance operations with a unique reference, plus a daily reconciliation report.

Reporting

Server data in a database your finance and dealing teams can query. MetaQuotes lists native SQL export to MySQL, MSSQL and Oracle on MT5.

Managed accounts

Connectors and portals for allocation modules. See MAM and PAMM setup.

Common MetaTrader integrations and where they go wrong
IntegrationAPI usually usedWhat it doesWhat to watch
CRM back officeManager APICreates accounts, sets group and leverage, reads trades for IB commissionManager rights too wide; one field owned by two systems
Client portalWeb API or Manager APIShows balance, equity and history; opens demo and live accountsSlow pages when every view triggers a server request
PaymentsManager APIPosts deposits and withdrawals after the PSP callbackDuplicate or missing balance operations after a timeout
Reporting and BIManager API, Report API or SQL exportFeeds dashboards, end-of-day and finance reportsTime zone of the server versus the reporting database
Risk toolsManager APIReads positions and exposure in near real timeEvent backlog during news spikes
MAM, PAMM and copy tradingServer API plugin plus Manager APIAllocates master trades to investor accountsPartial fills and restarts during open trades

How do you keep a MetaTrader API integration secure?

Treat every integration as a manager with keys to client money. The manager login an integration uses can move balances, so it deserves the same care as a dealer’s account. MetaTrader 5 supports role-based managers such as dealers, accountants and risk managers. It also supports permissions at several levels. Use them.

These are the controls we put in place on every project:

  • One manager login per integration, never shared with staff or with another vendor
  • Only the rights and groups that integration needs, reviewed when the scope changes
  • Connections allowed only from the integration server’s fixed IP addresses
  • Credentials kept in a secrets store, not in code or in a shared spreadsheet
  • A log of every write operation with the CRM or payment reference attached
  • A daily report that compares CRM payments with balance operations on the server
  • Old vendor logins and plugins removed when a contract ends
Run new code against a demo server that mirrors your live groups and symbols before it touches real accounts. Most incidents we are called in for started with a first test on the live server.

How does an API integration project with FXSUPPORT run?

A project starts with the data flows, not with code. We write down what each system owns and agree it with you before anything is built.

  1. Map the flows

    List every flow between MetaTrader and your other systems, from registration and KYC to payments, IB commission and reports. Decide which system owns each field.

  2. Choose the interface

    Pick the interface for each flow based on volume and on where the logic has to run. The answer is often a mix of the Manager API, the Web API and a plugin.

  3. Prepare the server

    Create dedicated manager logins with limited rights and IP restrictions, and a demo environment with the same group structure as live.

  4. Build and test

    Build the connector and test the normal cases. Then test the failures that happen in real life, such as a server restart, a timeout or a duplicate callback.

  5. Go live in stages

    Start read-only or with a small group of accounts, compare results with the server, then widen.

  6. Monitor and maintain

    Watch error logs and reconciliation reports, and retest after MetaTrader builds or vendor updates.

Do you need an API connector, a plugin or a ready-made product?

Buy a product when a vendor already covers your need, and build only the part that is specific to your business. A mature CRM already has its own MetaTrader connector. A bridge vendor ships its own gateway. Writing your own version of either rarely pays off.

Custom code makes sense for your own commission rules and for reports no vendor offers. It also fits links to in-house systems and checks that must run inside the server. When logic has to run inside MetaTrader, it becomes a plugin, which we cover on MetaTrader plugin development. When it can run outside, an external Manager API service is safer because a crash does not affect trading.

On a white label or grey label, API access depends on the provider who holds the server licence. Ask early what manager rights you will get. Our MT5 white label page explains the differences between the setups.

Frequently asked questions

What is the MT5 Manager API?

The MT5 Manager API is the interface MetaQuotes provides for building administration tools that log in to the server as a manager. Brokers use it to create accounts, change groups and leverage, post balance operations and read trades. MetaQuotes lists C++, ASP.Net and PHP support for it on MT5.

What is the difference between the Manager API and the MetaTrader 5 Web API?

The Manager API suits permanent back-office services with heavy traffic, while the Web API suits websites and portals. MetaQuotes describes the Manager API as the tool for administration utilities and the Web API as the tool for integration with web resources. Many CRMs use both.

Is there a MetaTrader 4 API for brokers?

Yes, MetaTrader 4 has its own set of five interfaces, led by the Manager API and the Server API. They still work on existing MT4 servers. MetaQuotes no longer sells MT4 licences, so new projects are built on MT5 and MT4 work focuses on maintaining what brokers already run.

What is the MT5 Gateway API used for?

The MT5 Gateway API connects MetaTrader 5 to other trading systems and custom price feeds. Bridge vendors use it to route orders to liquidity providers and bring quotes back. It is not meant for CRM or portal integration.

Where is the MetaTrader server API documentation?

MetaQuotes publishes the API reference in its Support Center, which requires a broker login. The public pages on metatrader5.com and metatrader4.com only summarise what each interface does. If you hold a licence, your administrator can request access.

Can we use Python to connect to our MT5 server?

Not with the MetaTrader5 Python package, because it talks to an installed trading terminal rather than to the server. For server-side work you need the Manager API or the Web API. A Python service can sit behind a Web API connection if your team prefers it.

Does an integration need a plugin on our trade server?

Usually not. Most CRM, portal and payment links run outside the server through a manager login. A plugin is only needed when logic must run inside MetaTrader, such as some commission rules or real-time checks on trade requests.

How do you stop duplicate deposits from an integration?

Give every balance operation a unique reference and check for it before posting. If the server does not answer, the connector should verify whether the operation already exists before retrying. A daily report comparing CRM payments with server operations catches anything that slips through.

Can we get API access on an MT5 white label?

It depends on the white label provider, because they hold the server licence and decide which manager rights to grant. Ask before you sign which APIs you can use, for which groups, and whether you can connect your own CRM.

How long does a MetaTrader API integration take?

It depends on the number of flows, the systems involved and how much testing your team needs to sign off. A single portal link is quicker than a full CRM sync with payments and IB commission. We give a timeline once the data flows are mapped.

Sources

  1. MetaTrader 5 for brokers, MetaQuotes, accessed October 2026
  2. MetaTrader 5 for brokers: APIs and deployment, MetaQuotes, accessed October 2026
  3. MetaTrader 5 vs MetaTrader 4 for brokers, MetaQuotes, accessed October 2026
  4. MetaTrader 4 API, MetaQuotes, accessed October 2026
  5. XCore solutions, PrimeXM, accessed October 2026

FXSUPPORT is not affiliated with MetaQuotes Ltd. or with any vendor or regulator named on this page. This page is general information, not legal or investment advice.

Talk to FXSUPPORT

Planning a CRM, portal or payment integration?

We work with brokerages and companies that run MT4 or MT5 servers. Tell us which systems you want to connect and what is going wrong today, and we will send a written plan.

We work with brokerages, prop firms and companies setting up a brokerage. We do not provide support to individual traders; if you trade with a broker, please contact your broker directly.

TelegramEmail
WhatsApp