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

MT5 Gateway API: how MetaTrader 5 connects to liquidity and exchanges

Every price a MetaTrader 5 broker shows and every trade it hedges passes through some kind of gateway. This guide explains what the Gateway API is, what a gateway does on a normal trading day, and when building your own is worth the trouble.

Updated 12 October 20268 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
Purpose
Connect MT5 to venues and data feeds
Carries
Prices in, orders and fills both ways
Alternatives
Third-party bridge or Ultency
Native LPs listed by MetaQuotes
37 (12 October 2026)
In short

The MT5 Gateway API is MetaQuotes’ toolkit for connecting a MetaTrader 5 platform to external trading systems — liquidity providers, exchanges and other platforms — and for creating custom data feeds. A gateway built with it brings prices into MT5 and sends client orders out for execution, following the routing rules the broker sets.

What is the MT5 Gateway API?

The MT5 Gateway API is the interface MetaQuotes provides for connecting MetaTrader 5 to other trading systems and for creating custom data feeds. It is a toolkit, not a ready-made connection: with it, a developer builds a gateway that understands one outside system — a bank’s FIX API, an exchange, another broker’s platform — and translates between that system and MT5.

MetaQuotes has offered this route since the early years of MT5. A 2013 announcement listed the first working gateways to ECNs and exchanges, and added that brokers could build their own. That sentence is still the best summary of what the API is for.

“Besides, Gateway API allows brokers to develop a gateway to any system or exchange on their own. Some brokers have already done that, while the proposed interfaces have greatly simplified their work.”
— MetaQuotes — MetaTrader 5 Gateways & Connectivity (21 August 2013)

What does an MT5 gateway actually do?

A gateway does three jobs continuously: it brings the provider’s prices into MT5 as quotes for your symbols, it passes the client orders you have chosen to hedge out to the provider, and it brings the execution reports back so MT5 can confirm, partially fill or reject the order.

On a normal day that looks simple. The difficult parts are the edges: what the gateway does when the provider rejects an order, when a fill arrives at a different price, when the session drops at 22:00 on a Sunday as markets reopen, or when a symbol’s trading hours differ between the provider and your MT5 configuration. A good gateway handles each of those predictably and tells your dealers about it.

The routing itself — which orders go out and which stay on your book — is configured in the MT5 administration tools. MetaQuotes describes gateways on its broker page as a way to hedge client risk immediately through other market participants, which is the classic straight-through processing use.

How does the Gateway API differ from the other MT5 APIs?

The Gateway API is the only MT5 interface designed to attach an outside market. The others manage accounts, extend the server or produce reports.

Where the Gateway API sits among the MT5 APIs
APIConnects MT5 toTypical use
Gateway APILiquidity providers, exchanges, other trading systems, data feedsHedging client flow, exchange access, custom price feeds
Web APIWebsites and company servicesCRM, client portal, custom WebTrader
Manager APIAdministration and management softwareDealer tools, back-office automation
Server APIPlugins inside the trade and history serversCustom rules on every operation
Report APIThe trade server’s reportingCustom reports
Based on MetaQuotes’ API definitions at https://www.metatrader5.com/en/brokers, accessed 12 October 2026. See also our MT5 Manager API comparison.

Gateway, bridge, Ultency or FIX API: what is the difference?

They sit at different levels. FIX is a messaging standard; a gateway and a bridge are software that uses it; Ultency is MetaQuotes’ own engine that aggregates providers inside MT5. Comparing them as if they were the same kind of thing is the most common confusion in this area.

Four terms brokers mix up
TermWhat it isWhere it runsTypical role
FIX APIAn open messaging standard for trading, maintained by the FIX Trading CommunityBetween any two systemsThe language most providers speak for prices and orders
MT5 gatewayA connector built with the Gateway APIAttached to the MT5 platformOne provider or venue, routing rules in MT5
Liquidity bridgeSeparate third-party software with its own database and panelIts own server between MT5 and providersSeveral providers, aggregation, MT4 and MT5 together
UltencyMetaQuotes’ matching and aggregation engine for MT5Native MT5 component in chosen hosting locationsSeveral providers, A/B/C-book routing, coverage rules

Which gateways and providers are available natively?

MetaQuotes now presents most native liquidity connections through Ultency. Its liquidity page lists the providers available that way; on 12 October 2026 it showed 37, including LMAX Group, Swissquote Bank, StoneX Financial Ltd, iSAM Securities Limited, Finalto Financial Services Limited and IC Markets Global. MetaQuotes describes the process as choosing a provider from a gallery in MT5, agreeing terms with it, receiving credentials and configuring the connection.

For exchanges, MetaQuotes says MT5 supports direct connectivity through dedicated gateways. Exchange gateways bring their own requirements — membership or a clearing broker, market-data licences and exchange certification — so expect a longer project than an FX provider.

A provider not on the list can still be reached with a custom gateway or a bridge, usually over FIX. That is where you weigh building against buying.

Should you build a custom MT5 gateway or use an existing one?

Most brokers should not build one. A custom gateway makes sense when you need a venue nobody supports, when you are a provider wanting to offer MT5 brokers a native connection, or when you have unusual execution logic and an in-house team to maintain it for years.

Use an existing connection

Fastest and cheapest to run. Choose Ultency or a ready gateway if your provider is available, or a bridge if you need several providers on MT4 and MT5.

Ask the provider

Many providers already support MT5 through Ultency, their own gateway or a bridge partner. Ask what they recommend before commissioning anything.

Build your own

Justified for an unsupported venue or a provider’s own product. Budget for certification, monitoring and updates with every MT5 build, not just the first version.

What does building a custom gateway involve?

If you do build, the work goes well beyond writing a FIX client. This is the sequence we would plan:

  1. Get the toolkitThe Gateway API comes from MetaQuotes to licence holders and developers; confirm access and documentation for your server build.
  2. Study the venueRead the provider’s FIX specification in full: sessions, message types, custom tags, reject reasons, trading hours and maintenance windows.
  3. Map symbols and sessionsBuild a table of every instrument: provider name, MT5 name, digits, contract size, minimum volume, sessions and holidays.
  4. Handle every outcomeFills, partial fills, rejects, price changes, timeouts and disconnections each need defined behaviour and a dealer alert.
  5. Certify and load-testPass the provider’s certification in its test environment, then test at news-day message rates.
  6. Operate itMonitoring, log retention, reconnect logic and a test cycle for each new MT5 build.

Is a gateway faster than a bridge?

Not necessarily. Removing one software hop can save a little processing time, but end-to-end latency is decided mostly by where your server is hosted relative to the provider, the quality of the network between them and how quickly the provider itself responds.

That is why hosting comes up in every serious liquidity conversation. MetaQuotes’ Ultency page makes the point directly, giving the example of a London server for forex providers and a New York server for NYSE providers. MetaQuotes also advertises latency “of up to 0.1 ms” for Ultency’s connectivity; that is the vendor’s figure for its own infrastructure, not a measurement of your setup. Measure your own round-trip times with your own provider before and after any change.

Does a white label or grey label broker need its own gateway?

Usually not. An MT5 grey label is a brokerage set up inside another company’s licensed MetaTrader 5 server: you get your own client groups and your brand on the WebTrader, mobile apps, CRM and client portal, while the MT5 server licence stays with the provider. The provider’s gateways serve your groups too, according to the routing agreed in your contract.

In a white label the same applies unless your agreement lets you bring a separate provider, which the server owner then installs and supports. Availability of new white labels depends on MetaQuotes’ current approach, so we check each case individually; our MetaQuotes white label policy guide collects the background. With your own MT5 licence, gateways are your decision and your responsibility. If you are applying for one, we handle the MetaQuotes requirements and application for clients as a consulting service.

Worked example: connecting one provider to an MT5 server

Say a newly licensed broker wants to hedge majors and gold with one prime-of-prime provider, and keep the rest of its flow internal at first. The provider is available natively, so no custom gateway is needed. The technical side — connection, symbol map, routing for one test group — can be ready within days of receiving credentials; the provider’s onboarding and margin deposit decide the real timeline.

The broker maps 28 FX pairs and XAUUSD, checks contract sizes and swap conventions against the provider’s specification, and routes a staff group first. After a week of comparing fills with the provider’s reports, client groups on the ECN-style account move across. The standard account stays on the internal book with exposure limits, which is a hybrid set-up described in our A-book, B-book and hybrid execution guide.

If you are planning something similar, message us on WhatsApp with the provider’s name and the symbols you need.

What do gateway and liquidity connections cost?

There is no single price: gateway and bridge vendors rarely publish fees, and most of the running cost comes from the provider rather than the connector. We do not publish figures on this page, but we can tell you which lines a complete quote should have, and send current figures for your set-up if you message us on WhatsApp.

For gateway software, ask each vendor and compare the total over two or three years, including updates and support. A complete quote for the connection and the provider usually covers these items:

What a gateway and liquidity quote should list
ItemWhy it matters
Gateway licence or subscriptionSome are bundled by the provider, others billed per server or per venue
Custom developmentOnly for venues without an existing gateway; check who owns the code
Updates for new MT5 buildsA gateway that breaks after a platform update stops your hedging
Support hoursOut-of-hours cover matters at the Sunday open and around news
Provider commission and minimumsUsually the largest running cost
Margin at the providerCapital you cannot use elsewhere
Market-data and venue feesCommon for exchange and index instruments
Hosting and cross-connectsData centre location close to the provider
Checklist based on FXUP project experience. Ask each vendor and provider for every line in writing.
Ultency is offered by MetaQuotes with a free 90-day trial, and no price is published. Factor the post-trial cost into any comparison before you build routing around it.

What should you ask a gateway vendor or provider before you commit?

Ask about failure handling and updates first; every vendor will tell you the connection is fast. These questions separate a gateway you can live with from one that will cost you on the first volatile day:

  • What exactly happens to an order that the provider rejects, and how is the dealer told?
  • How are partial fills reflected in MT5, and can a client end up with a volume they did not request?
  • What does the gateway do when the provider session drops with orders in flight?
  • Who updates the gateway when MetaQuotes releases a new MT5 build, and how quickly?
  • Which logs are kept, for how long, and can we export them for an execution-quality review?
  • Is there a test environment we can keep using after go-live for new symbols?
  • What support hours apply, and who answers at 22:00 on a Sunday when markets reopen?
Get the answers in writing. They become part of your execution arrangements, and regulators and auditors may ask how your order flow is handled when something fails.

Where does the gateway sit in the rest of the broker stack?

The gateway is one layer in a chain that runs from the provider to the client’s screen. Prices arrive through the gateway, MT5 applies your symbol settings and markups, and the result reaches clients through the desktop terminal, the web platform or your own front ends. Orders travel back along the same chain.

That means a problem a client reports — a strange spike on a chart, a slow fill — can start anywhere along it. When we investigate, we check the provider’s own report first, then the gateway log, then the MT5 journal, and only then the front end. Our forex broker technology stack overview shows how the layers fit together, and if you would like us to look at a specific incident, send us the details on WhatsApp.

How does FXUP help with MT5 gateways?

We help brokers choose between an existing gateway, Ultency and a bridge, prepare the symbol map, configure routing on the MT5 side and test the connection before clients use it. We do not sell gateway software or liquidity. FXUP is independent and not affiliated with MetaQuotes, and we work with whichever connector suits your providers.

Because our branded WebTrader reads prices and positions from the same MT5 server, we check after go-live that quotes and fills look right from the client’s side as well. For the commercial side of choosing providers, see liquidity provider integration; for how quotes are built, see forex price feed.

Questions buyers ask

What is the MT5 Gateway API?
It is MetaQuotes’ toolkit for connecting MetaTrader 5 to other trading systems and for creating custom data feeds. Developers use it to build gateways to liquidity providers, exchanges and other platforms.
Is an MT5 gateway the same as a FIX API?
No. FIX is a messaging standard; a gateway is software attached to MT5 that often uses FIX to talk to a provider. Whether a given gateway supports FIX depends on the provider it was built for.
What is the difference between an MT5 gateway and a liquidity bridge?
A gateway is attached to the MT5 platform and usually serves one provider, with routing rules in MT5. A bridge is separate software with its own server and panel that aggregates several providers and often supports MT4 as well. Our MT5 liquidity bridge guide compares them.
Do I need a gateway if I use Ultency?
Not for the providers Ultency supports. Ultency is MetaQuotes’ native engine for aggregating providers and routing orders inside MT5. You would still need a gateway or bridge for a venue that Ultency does not offer.
Who can build an MT5 gateway?
Developers with access to MetaQuotes’ Gateway API, usually working for a licence holder, a liquidity provider or a specialist vendor. The gateway then has to be installed on an MT5 platform by the server owner.
Can a grey label broker add its own gateway?
Usually not. In a grey label the provider controls the server and its gateways. Some providers allow separate routing for your groups; ask before you sign.
How long does it take to connect a provider through a gateway?
It depends mostly on the provider’s onboarding. With an existing native connection, the technical work is often days; company due diligence, margin deposits and certification usually take longer.
Does a gateway reduce latency?
It can remove a software hop, but hosting location, network quality and the provider’s own response time matter much more. Measure round-trip times with your provider before deciding on that basis.

Not covered here? Ask us on WhatsApp, message @FXUPCK on Telegram or write to [email protected].

Sources

  1. MetaQuotes — MetaTrader 5 Gateways & Connectivity (news, 21 August 2013) (accessed October 2026)
  2. MetaQuotes — MetaTrader 5 trading platform for brokers and banks (accessed October 2026)
  3. MetaQuotes — Liquidity providers for MetaTrader 5 (accessed October 2026)
  4. MetaQuotes — Ultency matching engine (accessed October 2026)
  5. MetaQuotes — MetaTrader 5 for brokers (metaquotes.net) (accessed October 2026)
  6. FIX Trading Community — Standards (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. FXUP does not publish prices; contact us for current figures for your setup.