Updated 22 October 2026By the FXSUPPORT engineering team
FIX API integration for a forex broker means opening FIX sessions between your bridge, hub or gateway and each liquidity provider. You map symbols and order types and pass the LP’s certification tests. MT4 and MT5 do not accept raw FIX credentials. A bridge plugin or MT5 gateway translates platform trades into FIX messages and writes the fills back.
What is FIX API, in broker terms?
A FIX API is an interface that sends and receives messages in the Financial Information eXchange protocol, the standard way trading systems exchange prices, orders and fills. FIX API integration is the work of connecting two such systems. For a brokerage that usually means your bridge or hub on one side and a liquidity provider, prime broker or ECN on the other.
The FIX Trading Community develops and maintains the standard. It calls FIX an application-layer protocol, which means it defines what an order or a fill means, not how the bytes travel. Every field has a numeric tag. Tag 35, for example, carries the message type, so 35=D is a new order and 35=8 is an execution report.
In practice you rarely write FIX by hand. Your bridge or FIX engine builds the messages. Your job is to agree the details with each counterparty and prove that both sides read every message the same way. Most of the work on this page is about that agreement.
“The FIX Protocol is a global, open standard that enables financial institutions to communicate trading information quickly, accurately and securely.”
FIX Trading Community, The FIX Protocol
Why FIX API 4.4 is still the version most LPs use
In our experience most forex LP connections run on FIX 4.4, with a minority on FIX 4.2. The standard body recommends its newer FIX Latest for new work. It also says versions 4.2 and 4.4 are still supported for firms with legacy implementations, and the forex market has stayed there.
Vendors follow the same pattern. Match-Trade, for example, says its FIX API adheres to the FIX 4.4 protocol. If your bridge speaks one version and an LP another, a translation layer has to map between them. Always build to the exact spec the LP sends, because two FIX API 4.4 implementations can still differ in custom tags and in which optional fields they require.
Which FIX messages does a broker and LP connection use?
A typical forex LP connection uses about a dozen message types. Session messages log on and keep the link alive. Market data messages carry prices, and order messages carry trades and fills. You will find these in almost every LP specification.
Many LPs split prices and orders into two sessions with different IDs. Most also add custom tags. FIX reserves the range 20000 to 39999 for user-defined tags agreed between two parties, so expect a few fields that are not in the standard dictionary.
| MsgType (tag 35) | Message | What it does for the broker |
|---|---|---|
| A | Logon | Opens the session and sets the heartbeat interval |
| 0 and 1 | Heartbeat and Test Request | Keep the link alive and check that the other side answers |
| 2 and 4 | Resend Request and Sequence Reset | Recover messages lost in a gap |
| 5 | Logout | Closes the session, for example at the end of the week |
| V and W or X | Market Data Request and Refresh | Subscribe to prices and receive them |
| D | New Order Single | Sends a client or coverage order to the LP |
| F and G | Cancel and Cancel/Replace Request | Cancel or change a resting order |
| 8 | Execution Report | Confirms fills, partial fills and rejects |
Message types as defined in the FIX 4.4 specification.
How does FIX API connect to MT4 and MT5?
FIX reaches MetaTrader through a bridge or gateway that runs on or next to the trade server. Neither MT4 nor MT5 lets you paste an LP’s host, port and IDs into the platform and start trading. A server-side component takes the platform’s trade request, turns it into a FIX order and writes the LP’s execution report back as a deal.
For FIX API MT4 integration the component is a server plugin. MetaQuotes says its MT4 Server API lets you “develop various server plugins with unlimited possibilities”, and every MT4 bridge plugin is built on it. The plugin passes orders to a hub or FIX engine, which holds the LP sessions. MetaQuotes no longer sells MT4 licences, so new MT4 FIX projects are for existing servers, often as part of an MT4 to MT5 migration.
For MT5 the interface is the Gateway API, which MetaQuotes describes as the tool for integrating MT5 “with other trading systems and creation of custom data feeds”. A MetaQuotes news item from July 2017 describes one vendor’s MT5 FIX bridge “implemented using the standard MetaTrader 5 Gateway API”. That is the normal pattern for every MT5 FIX connection.
What are the MT5 FIX API options?
MT5 brokers have four practical ways to work with FIX. Most do not need to build their own FIX engine. A bridge or hub that already holds certified FIX sessions to many LPs is usually faster to set up and cheaper to run.
| Option | Who holds the LP FIX sessions | Good fit | Trade-off |
|---|---|---|---|
| Bridge or hub (for example PrimeXM XCore, oneZero Hub, Match-Trade bridge) | The vendor’s engine, configured by you | Retail brokers with several LPs and hybrid routing | Vendor fees and feature limits |
| MetaQuotes Ultency | MetaQuotes’ native engine | MT5-only brokers who want aggregation inside the platform | MT5 only, LP list set by MetaQuotes |
| Single LP gateway | A gateway built for one LP | One LP, full STP | No aggregation |
| Own FIX engine plus custom MT5 gateway | You | Firms with their own order logic or OMS | Most development and certification with every LP |
Based on metatrader5.com, primexm.com, onezero.com and match-trade.com, accessed October 2026.
Connecting to LPs over FIX or offering FIX to your clients?
These are two separate projects, and brokers often mix them up. When you connect to an LP, your side is usually the initiator. You follow the LP’s spec and pass the LP’s certification.
When you offer FIX API access to your own institutional clients or white label partners, the roles flip. You become the acceptor. You publish your own spec, issue IDs, whitelist each client’s IPs and certify each client. Their orders then have to reach your risk rules and your books like any other flow.
There are two common ways to build the client side. Some hubs accept FIX takers directly. PrimeXM, for example, lists FIX API clients among the connections XCore accepts and publishes a FIX taker fee. The other way is a FIX acceptor that books trades into MT5 through the Manager or Gateway API. Our MetaTrader API integration page covers that side. Either way, decide early whether FIX clients get their own MT5 group and their own routing rules.
How do you set up a FIX session with a liquidity provider?
A FIX session is defined by the FIX version, your SenderCompID and the LP’s TargetCompID. On top of that come the connection, schedule and recovery settings both sides must agree before the first logon. We fill in a parameter sheet with the LP before any configuration, because mismatched values cause most failed first logons.
Security is part of the sheet. The FIX Trading Community publishes FIX over TLS, known as FIXS, as its standard for securing sessions. Some LPs ask for a VPN or a cross-connect in the same data centre instead.
| Parameter | Typical value | Why it matters |
|---|---|---|
| BeginString | FIX.4.4 or FIX.4.2 | Must match exactly or the logon is rejected |
| SenderCompID and TargetCompID | Issued by the LP, case-sensitive | Identify the session, often separate pairs for prices and orders |
| Initiator or acceptor | Broker usually initiates | Decides who opens the connection |
| Host, port and IP whitelist | Test and production endpoints | LPs only accept whitelisted addresses |
| Transport security | TLS, VPN or cross-connect | Protects credentials and order flow |
| Heartbeat interval | Agreed value, often 30 seconds | Set by the initiator and echoed back |
| Session schedule | Weekly start and end in UTC | DST changes shift the times |
| Sequence reset policy | On logon, daily or weekly | A wrong policy causes rejected logons or resend storms |
| Custom tags | LP-specific fields | Must be in the data dictionary or validation fails |
FIX protocol integration step by step
A FIX protocol integration with one LP follows the same order whether the session ends in a bridge, a hub or your own engine. Most delays come from a whitelist or a custom tag that nobody noticed until testing.
Get the LP’s spec
Rules of engagement, supported messages and tags, test and production endpoints, IDs and the certification checklist.
Decide where the session ends
In your bridge or hub, or in your own FIX engine such as the open-source QuickFIX.
Prepare the network
Static IPs, firewall rules, TLS or VPN, and a server close to the LP’s data centre.
Configure the session
Version, IDs and heartbeat, the schedule in UTC and the reset policy. Load the data dictionary with custom tags.
Map symbols and volumes
Platform symbol to LP symbol, with digits, contract size, minimum and step volume and trading hours.
Set routing in the bridge
Which MetaTrader groups go to this LP, the A-book and B-book rules, markups and the fallback LP.
Certify and go live
Pass the LP’s certification, switch to production, place controlled test trades, then hand over to monitoring.
How do FIX testing and LP certification work?
FIX certification is a scripted test in the LP’s test environment. You prove that your side handles session events and order flows the way the LP’s spec requires, and only then do you get production credentials.
The session layer is where most certifications fail. Your engine must keep the sequence numbers intact through disconnects, answer a Test Request within the agreed interval and recover a gap with Resend Request and Sequence Reset. On the order side the LP checks market and limit orders, full and partial fills, rejects, cancels and cancel-replace with correct order IDs.
Edge cases come last. They include orders sent during a disconnect, duplicate execution reports flagged as possible duplicates, unknown symbols and orders outside trading hours. We run these against our own simulator of the counterparty before the LP’s slot, so certification day holds few surprises. Finally every LP execution report must match a deal on the MetaTrader server and a line in the bridge log.
What should you monitor after a FIX session goes live?
Monitor session state, message flow and reconciliation. A FIX session can show as connected while prices go stale or execution reports stop arriving.
We watch for unexpected logouts and repeated reconnects, and read the reason text in tag 58. Unanswered Test Requests point to network loss or a stalled engine. Resend Requests and sequence rejects mean a reset is needed, which should never be done on production without the LP. Stale prices for one symbol, a rise in rejects and fills at the LP with no matching deal in MetaTrader each get their own alert.
Sessions also tend to drop around DST changes and holidays, so we update session times in UTC and symbol sessions on the platform before each change. This monitoring is part of our MetaTrader support service, with infrastructure we manage run on a 99.9% uptime target. For wider server faults, see MetaTrader server troubleshooting.
What FXSUPPORT does in a FIX API project
We handle FIX connectivity from the LP’s spec to daily monitoring. The bridge layer itself is covered on our MT4/MT5 liquidity bridge, PrimeXM XCore, oneZero Hub and Match-Trade pages. Routing policy is on forex broker risk management, and the full brokerage stack on forex broker solutions.
We do not publish prices. The main cost factors are the number of LPs and sessions, an existing bridge versus a custom engine, version translation or custom tags, hosting and ongoing monitoring. FXSUPPORT is not affiliated with MetaQuotes, the FIX Trading Community or any vendor named here.
Session setup
Initiator or acceptor sessions, TLS, firewall rules, schedules and sequence handling for FIX 4.2 and 4.4.
MetaTrader side
MT5 gateway or MT4 plugin setup, symbol mapping, group routing and reconciliation with platform deals.
Custom adapters
Adapters for LP custom tags and version translation, built on QuickFIX or an engine you already license.
Certification and monitoring
Simulator test runs, LP certification support, then alerts on stale prices, rejects and session drops.
Frequently asked questions
What is FIX API in forex?
A FIX API is an interface that sends and receives messages in the Financial Information eXchange protocol. Brokers and liquidity providers use it to stream prices and to send orders and execution reports between bridges, hubs and trading engines.
Can MT4 connect to a FIX API directly?
No. MT4 needs a bridge plugin built on the MT4 Server API, which hands trades to a hub or FIX engine. The FIX session runs in that engine, not inside MetaTrader.
How does MT5 connect to a FIX liquidity provider?
Through a gateway built on the MT5 Gateway API, usually supplied by a bridge vendor, or through MetaQuotes’ Ultency engine. The gateway passes orders to the engine that holds the FIX sessions with your LPs.
What is the difference between FIX 4.2 and FIX 4.4?
They are separate releases with different message and field definitions, and 4.4 added more of both. The FIX Trading Community still supports both for legacy use, and most forex LPs publish a 4.4 spec. Follow your LP’s version exactly.
Which bridges support FIX connectivity to MT4 and MT5?
Most commercial bridges and hubs do. PrimeXM XCore accepts MetaTrader and FIX clients, oneZero Hub connects to MetaTrader 4 and 5, and Match-Trade offers a FIX 4.4 API. Check each vendor’s current documentation for your LPs.
What do I need from the LP before starting?
You need the FIX spec, the version, IDs for price and order sessions and both sets of endpoints. Ask also for the whitelist process, the session schedule, the symbol list and order types, any custom tags and the certification checklist.
How long does a FIX API integration take?
It depends mostly on the LP’s certification schedule and on custom tags. The configuration is rarely the slow part. We give a dated plan once we have the LP’s spec and your bridge details.
How is a FIX session secured?
Usually with IP whitelisting plus TLS, a VPN or a cross-connect in the same data centre. The FIX Trading Community publishes FIXS, FIX over TLS, as its standard for securing sessions.
Why does my FIX session keep rejecting logon?
The usual causes are wrong IDs or version, an IP that is not whitelisted, a logon outside the session schedule, or a sequence mismatch after a reset on one side only. The Logout reason in tag 58 and the engine log normally show which.
Can I offer FIX API access to my own clients?
Yes, as a separate project. You act as the acceptor, publish your own spec, certify each client and route their orders through your bridge or hub into your MT5 groups and books.
Sources
- The FIX Protocol, FIX Trading Community, accessed October 2026
- FIX over TLS (FIXS), FIX Trading Community, accessed October 2026
- MetaTrader 5 for brokers (Gateway API), MetaQuotes, accessed October 2026
- HUBECN releases MetaTrader 5 FIX bridge, MetaQuotes, 19 July 2017 (metatrader5.com), accessed October 2026
- MetaTrader 4 API, MetaQuotes (metatrader4.com), accessed October 2026
- Ultency matching engine, MetaQuotes, accessed October 2026
- XCore and XCore pricing, PrimeXM, accessed October 2026
- Retail brokers, oneZero, accessed October 2026
- FIX API, Match-Trader, accessed October 2026
- QuickFIX engine documentation (quickfixengine.org), 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.