1. Home
  2. MT5 APIs & Execution
  3. MT5 Web API
MT5 Web API · Updated October 2026

MetaTrader 5 Web API: what it is, what it can and cannot do

The MT5 Web API is the interface most broker integrations actually use: CRMs, client portals and custom trading front ends. We run a production WebTrader on it, so this guide is written from the inside, including the parts that are not in the brochures.

Updated 25 October 20269 min readFXUP editorial team
TradersWebTrader, iOS and Android apps
MetaTrader 5 serverGroups, symbols, risk settings
Gateway or bridgeA-book, B-book or hybrid routing
Liquidity providersPrices and execution
Logs in as
An MT5 manager account
Transport
HTTPS requests with JSON replies, plus a binary protocol
Push to clients
Not built in — the integrator adds it
FXUP use
Go back end behind our WebTrader and apps
In short

The MetaTrader 5 Web API is MetaQuotes’ server-side interface for connecting an MT5 trade server to websites, CRMs and other company systems. An application logs in with a manager account and can manage users, balances, groups, symbols, orders, positions, deals, ticks and charts. It does not connect liquidity providers or stream an LP order book; those jobs belong to other MT5 APIs.

What is the MetaTrader 5 Web API?

The MetaTrader 5 Web API is the interface MetaQuotes provides for connecting an MT5 trade server to a broker’s own web services: the client portal, the CRM, payment processing, reporting and custom trading front ends. It runs against the server, not against a trader’s terminal, and it authenticates as a manager — the same kind of account your back-office staff use in the MT5 Manager terminal.

MetaQuotes’ own one-line definition is short, and it is accurate: the Web API is for integration with web resources and other company services. Everything else on this page is about what that means in practice. The full technical reference sits on MetaQuotes’ support site, which is available to licence holders after login; if you hold an MT5 server licence, or work for one, that reference is the authority over anything written here.

“Web API is used for platform integration with web resources and other services of the company.”
— MetaQuotes — MetaTrader 5 trading platform for brokers and banks

How is the Web API different from the other MetaTrader 5 APIs?

MetaQuotes publishes five APIs for MT5, and each one has a different job. The Web API is the one that talks to the server from outside over the network; the others either run inside the server, connect it to markets or extend its reports. The definitions in the second column are quoted from MetaQuotes’ broker page.

The five MetaTrader 5 APIs
APIMetaQuotes’ definitionWhere your code runsTypical broker job
Web API“used for platform integration with web resources and other services of the company”Your own server, connecting over the networkCRM, client portal, payments, custom WebTrader
Manager API“allows you to develop custom administration and management utilities, or even your own manager terminal”A manager application connecting to the serverBack-office tools, dealing and risk utilities
Server API“can help you add more functions to MetaTrader 5 Trade Server and MetaTrader 5 History Server”Inside the MT5 server as a pluginCustom rules on every trade, bonuses, copy logic
Gateway API“used for MetaTrader 5 integration with other trading systems and creation of custom data feeds”A gateway attached to the platformLiquidity providers, exchanges, data feeds
Report API“expands the reports which are produced by the MetaTrader 5 trade servers”Inside the reporting componentCustom regulatory and management reports
Definitions quoted from https://www.metatrader5.com/en/brokers, accessed 12 October 2026.

Is the MT5 Web API REST or WebSocket?

The MT5 Web API is request and response: your application sends a command and waits for the answer. In current versions that means HTTPS requests to paths such as /api/user/get or /api/tick/last with JSON replies, alongside an older binary protocol over a persistent socket that MetaQuotes’ own sample code uses. We use both, for different jobs.

What it is not is a WebSocket API. Nothing in the Web API pushes a price or a position change to you on its own initiative; if you want live updates, you ask for them at a frequency you choose. When you read that a provider’s “MT5 Web API is WebSocket-based”, what they usually mean is that they built a WebSocket layer on top — which is exactly what we did for our branded WebTrader.

A second confusion is worth clearing up early. Several services sell an “MT5 API” that connects to a trader’s account through a terminal running on their cloud, or through MetaQuotes’ Python package for the desktop terminal. Those are account-level tools for traders and signal services. The Web API is broker-level: it sees every account on the server that the manager is allowed to see.

How does authentication to the MT5 Web API work?

Your application authenticates as an MT5 manager using a challenge-response exchange, so the manager password never travels in clear text. In the HTTPS form we use, it takes two calls:

  1. StartThe application calls the auth start command with its manager login, declaring itself as a Web API agent. The server replies with a random challenge.
  2. AnswerThe application combines the password hash with that challenge, sends the result, and adds a random challenge of its own.
  3. Verify the serverThe server answers the client’s challenge; the application checks that answer, so both sides have proved they know the password.
  4. Keep the sessionThe authenticated session is tied to the underlying connection. Drop the connection and you authenticate again.

What can you build with the MetaTrader 5 Web API?

Almost every client-facing system a broker needs can be built on the Web API, because it reaches the objects those systems care about: users, accounts, groups, symbols, orders, positions, deals and price history. The table maps the command areas we use to the jobs they serve.

Web API command areas and what brokers use them for
AreaWhat it coversTypical use
Users and accountsCreate, update, delete and read accounts; check or change passwords; read balance, equity and marginAccount opening after KYC in the CRM, password resets, portal dashboards
Balance operationsDeposits, withdrawals, credit and corrections on an accountCrediting a card or bank deposit automatically
Groups and symbolsRead and maintain groups and symbol settingsShowing correct contract specs, margin and sessions in a front end
Orders, positions, deals, historyOpen and historical trading data, including batch queries for many accountsTrade history, statements, IB commission calculations
Prices and chartsLast ticks, tick statistics, tick history and chart barsQuotes and charts in a WebTrader or mobile app
Trade requestsRequests executed on the server on behalf of an account, with a result codePlacing, modifying and closing orders from a custom front end
Mail and newsInternal mail and news to terminalsService messages to clients
Based on the Web API command set used in FXUP’s production integration. Check the MetaQuotes reference for your server build.

What can the MT5 Web API not do?

The Web API cannot connect your server to liquidity, cannot run code inside the server and cannot push data to you. Those limits are by design: other MetaTrader 5 APIs exist for each of those jobs.

  • No liquidity connectivity. Prices from banks or prime-of-prime providers arrive through a gateway, a liquidity bridge or Ultency — see the MT5 Gateway API and liquidity integration pages.
  • No LP order book or market depth. The Web API gives you last ticks and statistics per symbol. It does not stream the aggregated book from your providers, so a Web API front end shows bid and ask, not a depth-of-market ladder.
  • No logic inside the server. Rules that must run on every trade, before it is executed, need a Server API plugin. A Web API application only sees what has already happened.
  • No push. Every update is a request; live quotes and positions mean polling at a rate you choose and the server can sustain.
  • No custom server reports. Extending the reports the trade server itself produces is the Report API’s job.
If a supplier promises market depth from your LPs inside a Web API-based WebTrader, ask exactly which interface the depth comes from.

How does FXUP use the MT5 Web API for its WebTrader?

Our WebTrader and mobile apps never talk to MT5 directly. They connect over secure WebSocket to a back end written in Go, and that back end talks to the MT5 server through the Web API using both the binary protocol and HTTPS requests. The client sees push-style updates; the MT5 server sees a small, predictable number of manager sessions.

You can try the result in the WebTrader demo and the mobile app demo, both connected to a real MT5 demo environment. FXUP is an independent developer and not affiliated with MetaQuotes; we build on the published interfaces like any other integrator. Our own CRM uses the same back end, and we also work with partner CRMs, proposing whichever fits the broker’s set-up.

Batch poller

One loop asks MT5 for ticks, positions, orders and account figures every 100 milliseconds using batch queries, so the load on the server does not grow with the number of connected users.

Per-client push

Each connected client receives only the symbols and accounts it subscribed to, and unchanged sections are not re-sent. Large frames are compressed.

History cache

Chart history is cached on disk and loaded lazily, so a trader scrolling back through years of H1 candles does not hit the MT5 server each time.

Trade safety

An identical order that is still executing is de-duplicated, and neither server nor apps automatically re-send a trade after a timeout — a double fill is worse than a retry the trader chooses.

How are trades placed through the Web API?

A trade through the Web API is a request executed on the server on behalf of the client’s account, followed by a result. Your application submits the request, receives an identifier, then reads the outcome: a return code such as 10009 (done) or 10008 (order placed), or a rejection such as invalid stops, market closed or not enough money.

Two practical consequences follow. First, the client’s own permissions still apply: group settings, symbol trading modes, stop levels and margin are enforced by the server, not by your front end, so the server is the final word. Second, a timeout does not mean the order failed. If the answer does not arrive, the honest response is to check positions and history before doing anything else. Our front ends tell the trader the outcome is uncertain rather than sending the same order again.

Timestamps are another detail that catches teams out. MT5 records times in the trade server’s configured time zone; anything you show to clients or store in a CRM should be converted to real UTC once, in one place.

How secure is an MT5 Web API integration?

The Web API itself uses challenge-response authentication and supports encrypted sessions; most of the remaining risk sits in how the integrator handles the manager account. A Web API manager can often move money and change accounts, so treat its credentials like the keys to a bank account. MetaQuotes states on its broker page that data exchange between system components runs over an encrypted connection; your own systems need the same discipline.

  • Give the integration its own manager account with only the permissions and groups it needs; never reuse a dealer’s login.
  • Restrict where that manager can connect from and keep the credentials in a secrets store, not in source code.
  • Never expose the Web API to browsers or apps. Clients connect to your back end, which checks every request against the client’s own account.
  • Rate-limit and lock out repeated failed logins per IP address on your side.
  • Log every balance operation with who triggered it and why, and reconcile those logs against the CRM daily.

Does the MT5 Web API have rate limits?

MetaQuotes does not publish request limits on its public pages, and we will not quote numbers we cannot point to. In practice the limit is your server’s capacity and the behaviour of your integration, and a careless integration can slow a trade server for everyone.

What works for us is to keep a pool of authenticated sessions, separate trading requests from general queries, use batch commands wherever they exist, and cache anything that does not change every second, such as symbol settings and closed history. On the client side we apply a general message guard per connection but no limit on trades: a client is allowed to send orders back to back, because that is what trading is.

If you are designing your own integration, write down its load profile before go-live: how often you poll each data type, for how many accounts, and through how many sessions. That one page answers most of the questions a server administrator will ask.

Who can get MT5 Web API access?

Web API access comes from whoever controls the MT5 server, because it needs a manager account on that server. What that means depends on your setup. To see which FXUP setup gives you the access you need, with current prices and conditions on the same screen, compare the options in the solution finder.

Web API access by brokerage setup
SetupWho controls the serverWhat you can usually get
Own MT5 licenceYour companyFull access; you create managers and set permissions yourself
MT5 white labelThe licence holderA manager limited to your groups, if the agreement allows it
MT5 grey labelThe providerVaries by provider; with FXUP, a dedicated Manager account that sees only your users, plus Manager API and SDK access after payment
General pattern from FXUP projects; the exact terms are set in each agreement.

What should be on an MT5 Web API integration checklist?

Before you write code, settle the things that are expensive to change later. This is the list we go through with clients connecting a broker CRM, portal or front end; the same checklist applies to the other custom integrations we build:

  • Which server build and which Web API form (HTTPS, binary or both) you will use.
  • A dedicated manager account, its permissions and the groups it can see.
  • Which events trigger account creation, balance changes and group moves — and who approves them.
  • Polling frequency per data type and the batch commands that cover it.
  • Time zone handling and a single conversion point.
  • What happens on a timeout for each operation, especially trades and balance changes.
  • Monitoring: an alert when the MT5 connection drops, not a complaint from a client.

Questions buyers ask

What is the MetaTrader 5 Web API?
It is MetaQuotes’ server-side interface for connecting an MT5 trade server to websites, CRMs and other company systems. An application logs in as a manager and can manage users, balances, symbols, trades and history. It is aimed at brokers and their developers, not at individual traders.
Is the MT5 Web API REST?
Largely, yes. Current versions accept HTTPS requests and return JSON, and there is also a binary socket protocol. It is request and response; there is no built-in WebSocket push, so live data has to be polled.
Can I build my own WebTrader on the MT5 Web API?
Yes. That is how our WebTrader works: a Go back end talks to MT5 through the Web API and streams to the browser and apps over WebSocket. You need to handle polling, caching, time zones and trade timeouts carefully.
Does the Web API give access to market depth?
No, not the aggregated order book from your liquidity providers. It gives last ticks and statistics per symbol. Market depth and LP connectivity sit with gateways, bridges and Ultency.
What is the difference between the Web API and the Manager API?
Both act as a manager on the server. The Manager API is a library for building administration tools and manager terminals; the Web API is designed for network integration with web services such as a CRM or portal. Our MT5 Manager API guide compares them in detail.
Can a grey label broker get API access?
It depends on the provider. In a grey label the provider controls the server, and some only let you work through their own CRM and front ends. On FXUP’s grey label you get a dedicated Manager account that sees only your own users, and Manager API and SDK access after payment, which is what you need to connect a CRM or a prop dashboard.
Are there rate limits on the MT5 Web API?
MetaQuotes does not publish figures on its public pages. In practice the limit is your server’s capacity, so use batch commands, caching and a fixed pool of sessions rather than one session per user.
Is the MT5 Web API secure?
Yes, if you handle the manager account properly. Authentication is challenge-response and sessions can be encrypted. The main risks are over-privileged managers, credentials in code and exposing the API directly to clients.
How long does an MT5 Web API integration take?
It depends on scope. Reading accounts and history for a portal is a small job; a full trading front end with live data, charts and order handling is a project of its own. We scope each case after seeing the requirements.
Do I need permission from MetaQuotes to use the Web API?
You need a manager account on an MT5 server, which comes from the licence holder. FXUP is not affiliated with MetaQuotes; for licensing questions about API components, ask MetaQuotes or your server provider directly.

Not covered here? Open the solution finder and see the setup, prices and conditions that fit your case.

Sources

  1. MetaQuotes — MetaTrader 5 trading platform for brokers and banks (accessed October 2026)
  2. MetaQuotes — MetaTrader 5 for brokers (metaquotes.net) (accessed October 2026)
  3. MetaQuotes — Liquidity providers for MetaTrader 5 (accessed October 2026)
  4. MQL5 Reference — Python integration for the MetaTrader 5 terminal (accessed October 2026)

FXUP is an independent consulting and technology firm and is not affiliated with MetaQuotes Ltd. MetaTrader 4 and MetaTrader 5 are trademarks of MetaQuotes Ltd. This page is general information, not legal, tax or investment advice; regulatory requirements depend on the jurisdiction and change over time. Current FXUP prices and conditions are shown in the solution finder.

Solution finder

See which MT5 setup gives you the API access you need

Tell the finder whether you run your own server or need one, and what you plan to connect. It shows the matching FXUP product with current prices and conditions.

See the right solution and price See it live: WebTrader demo · mobile app demoPrefer to reach us directly? Contact
  1. 01
    Answer a few questions

    What you are building, which platform, live or demo.

  2. 02
    See price and conditions

    On the same screen where you choose, before you share any details.

  3. 03
    Continue with a reference

    Your selections reach the team, and you pick up on WhatsApp, Telegram or email.

Solutions & prices