MetaTrader FIX API: Does MT4 or MT5 Have One?

People search for a MetaTrader FIX API for one of two reasons. Either they want faster, more direct execution than the terminal gives them, or they want to drive their MT4 or MT5 account from their own code without writing MQL. FIX sounds like the professional answer to both. The catch is that MetaTrader does not offer it to traders.
The short answer
Neither MetaTrader 4 nor MetaTrader 5 gives traders a FIX API. FIX shows up in the MetaTrader world on the broker side, where the MetaTrader server connects to liquidity providers. A broker can offer its clients FIX access through a third-party plugin, but that is the broker's decision, it is usually reserved for professional clients, and you cannot switch it on from your terminal.
If what you actually want is to automate an MT4 or MT5 account from Python, Node.js or any other language, a REST and WebSocket API on top of the account is the practical route.
This guide explains what FIX is, where it really sits in a MetaTrader setup, what a broker FIX account costs and leaves out, and how to pick between FIX and a REST API for your own trading.
What the FIX protocol is
FIX (Financial Information eXchange) is an open messaging standard for trading, started in 1992 and maintained today by the FIX Trading Community. Banks, exchanges, ECNs and brokers use it to stream prices and send orders to each other. In retail forex and CFDs, almost every FIX offering speaks FIX 4.4.
A FIX connection is a long-lived TCP session. You log on once, both sides number every message, exchange heartbeats to prove they are alive, and resend anything the other side missed. Many brokers split this into two sessions: one for prices and one for trading.
The messages themselves are flat lists of tag=value pairs separated by an invisible SOH character (shown here as |). This is a market order to buy 10,000 units of EURUSD:
8=FIX.4.4|9=128|35=D|49=CLIENT1|56=BROKER|34=12|52=20261025-09:30:00.000|11=ord-0001|55=EURUSD|54=1|38=10000|40=1|59=3|60=20261025-09:30:00.000|10=040|
35=Dis the message type, New Order Single.49and56are the sender and target, and34is the message sequence number.11is your own order ID, which the broker echoes back in every execution report.55=EURUSD,54=1(buy) and38=10000: symbol, side and quantity. FX quantities are in units, so 10,000 is 0.1 lot.40=1is a market order and59=3means immediate or cancel.9is the body length and10a checksum, both of which your FIX engine computes.
FIX is compact and fast, and the same message shapes work at every venue that speaks it. The price is complexity: someone has to manage sequence numbers, resends, logons and heartbeats. In practice you use a FIX engine such as QuickFIX (C++, with Python bindings), QuickFIX/J or QuickFIX/n rather than writing that layer yourself.
Where FIX actually sits in a MetaTrader setup
A MetaTrader account involves three pieces. Your terminal (the MT4 or MT5 app on your PC, phone or VPS) talks to your broker's MetaTrader server over MetaQuotes' own proprietary protocol. The broker's server then has to get prices from somewhere and send some orders onward, and that is where FIX comes in.
MetaTrader 5 ships a Gateway API for exactly this job, and a whole industry of bridge vendors builds on it: aggregators that pull quotes from many liquidity providers and route orders to the best price, mostly over FIX. MT4 brokers use server plugins for the same purpose. So when a broker advertises a "FIX bridge" or "FIX liquidity" on its MetaTrader accounts, it is describing how it routes your orders, not something you can connect to.
Can a broker give you FIX on a MetaTrader account?
Sometimes, but not because MetaTrader offers it. There are three ways traders end up with FIX access, and only the first one touches a MetaTrader login at all.
- A FIX plugin on the broker's MetaTrader server. Vendors such as Brokeree, Your Bourse and Tools for Brokers sell MT4/MT5 brokers add-ons that accept client FIX sessions and turn them into trades on the MetaTrader server. Brokers mostly buy these to serve institutional clients or to act as a liquidity provider themselves. Few advertise them to retail traders.
- A separate FIX account at the broker. This is what "FIX API trading" usually means on a broker's website: a dedicated account that connects to the broker's pricing and execution engine directly, next to MetaTrader rather than through it. Swissquote, for example, offers FIX 4.4 to institutions and to private traders with their own platforms, with a minimum deposit of $50,000.
- A platform with FIX built in. cTrader is the notable case among retail platforms: FIX 4.4 credentials are in the cTrader settings, with no minimum deposit or volume conditions. It is a good option if you can move to a cTrader broker, but it does nothing for an MT4 or MT5 account.
| Route to FIX | Uses your MT4/MT5 login? | Typical barrier |
|---|---|---|
| FIX plugin on the MetaTrader server | Yes, if your broker installed one | Broker's choice, usually professional clients |
| Separate broker FIX account | No, a different account | High deposit, e.g. $50,000 at Swissquote |
| cTrader FIX API | No, cTrader accounts only | No minimum deposit or volume |
What a FIX connection usually leaves out
Broker FIX feeds are built for two jobs: streaming prices and handling orders. Everything else depends on the implementation, and it is often missing. cTrader's documentation says plainly that its FIX API cannot show your balance, leverage or margin and does not support historical market data. Spotware points you to its separate Open API for that. Swissquote's FIX, on the other hand, does include historical quotes.
For a real trading system that matters. Position sizing needs your balance and free margin, risk checks need open positions, and most strategies need historical bars to warm up their indicators. With a FIX-only connection you often end up running a second API next to it anyway.
FIX vs a REST and WebSocket API for MetaTrader
If you are a retail or prop trader with an MT4 or MT5 account, the realistic comparison is not FIX against MetaTrader. It is a broker FIX account against an HTTP API that works with the MetaTrader account you already have.
| FIX API | REST + WebSocket on MT4/MT5 | |
|---|---|---|
| Connection | Persistent TCP session with sequence numbers | HTTP requests plus one WebSocket stream |
| Message format | tag=value pairs | JSON |
| What you build | A FIX engine or a QuickFIX integration | An HTTP client, in any language |
| Balance, margin, positions | Often missing or limited | Included |
| Historical bars | Often missing | Included |
| Who can get it | Clients the broker approves for FIX | Any MT4 or MT5 account, demo included |
| Best for | Market making, latency-critical and multi-venue trading | Bots, dashboards, copy trading, prop firm accounts |
On raw speed, FIX wins. A REST call adds HTTP overhead, and an API that drives a MetaTrader terminal adds the terminal's own round trip to the broker server. For strategies whose edge is measured in microseconds, that is decisive. For strategies that trade on one-minute or slower bars, on signal webhooks or on portfolio rebalancing, the spread and the broker's execution dominate, not the protocol you send the order with.
Do you actually need FIX?
You probably do if:
- you make markets or run high-frequency strategies;
- your latency budget is a few milliseconds or less;
- you route orders across several liquidity providers or venues;
- you trade institutional size, and a five-figure deposit is not an obstacle.
You probably don't if:
- your strategy trades on bar closes, indicators or external signals;
- you trade a prop firm account. Prop firms hand out platform logins, not FIX sessions;
- you run several MT4 or MT5 accounts, possibly at different brokers;
- you want to build and test on a demo account first.
How to automate an existing MT4 or MT5 account
If FIX is out of reach or overkill, there are three ways to control a MetaTrader account from code.
1. An Expert Advisor in MQL
The native route. Your logic runs inside the terminal, written in MQL4 or MQL5. It is fast and needs no extra service, but the terminal has to run around the clock, usually on a Windows VPS, and talking to code outside MetaTrader means building your own glue with web requests, sockets or files.
2. The official MetaTrader5 Python package
MetaQuotes publishes a MetaTrader5 package on PyPI. It only covers MT5, it needs Windows, and it controls a terminal that must be installed and logged in on the same machine as your script. There is no MT4 equivalent.
3. A hosted REST and WebSocket API
This is what FxSocket does. You give it a broker login, it starts a dedicated MT4 or MT5 terminal for that account in the cloud, and you get a REST API and a WebSocket stream back. It works with any broker that offers MetaTrader, on demo and live accounts, from any language that can make an HTTP request. Reading the account and placing an order looks like this:
# Balance, equity and margin of the account
curl -H "X-API-Key: $FXSOCKET_API_KEY" \
https://api.fxsocket.com/mt5/$ACCOUNT/AccountSummary
# Market buy 0.1 lot EURUSD with stop loss and take profit
curl -X POST https://api.fxsocket.com/mt5/$ACCOUNT/OrderSend \
-H "X-API-Key: $FXSOCKET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"symbol": "EURUSD", "operation": "Buy", "volume": 0.1,
"stopLoss": 1.148, "takeProfit": 1.162}'Prices, bar closes, positions and trade events stream over one WebSocket per account, and balance, margin, deal history and OHLC bars are all REST calls, so you get the account data that FIX tends to leave out. There are official SDKs for Python and Node.js, and the documentation covers every endpoint for MT4 and MT5.
To be clear about the trade-off: this is not a FIX API, and it is not faster than one. Your orders still go through MetaTrader and your broker's execution, exactly as if you clicked in the terminal. What you gain is access: the account you already have, at the broker or prop firm you already use, from normal code. If you want to cut the distance to your broker, a dedicated server with a fixed IP in your broker's region runs your terminals right next to it. FxSocket is not a broker, and your money stays with yours.
Automate the MetaTrader account you already have
Connect any MT4 or MT5 account, demo or live, and control it over REST and WebSocket from Python, Node.js or any other language. No FIX session, no minimum deposit, no MQL.
Frequently asked questions
Does MT4 have a FIX API?
No. MetaTrader 4 has no built-in FIX interface for traders. Brokers run third-party FIX bridges on their MT4 servers, mostly to route orders to liquidity providers, and a few use such a plugin to let professional clients connect over FIX. Whether that exists is up to the broker.
Does MT5 have a FIX API?
Not for traders. MetaTrader 5 has a Gateway API that brokers use to connect their MetaTrader server to liquidity providers, often over FIX. A client-facing FIX session on an MT5 account only exists if your broker has installed a third-party plugin for it.
Can I use FIX with a prop firm account?
Almost never. Prop firms hand out platform logins (MT4, MT5, cTrader and others), not FIX sessions. To automate a funded MT4 or MT5 account from your own code, you need an API that works through the terminal login, such as a REST and WebSocket API.
How much does a FIX API account cost?
Broker FIX accounts usually come with a high deposit requirement. Swissquote, for example, asks for a minimum deposit of $50,000. cTrader is the exception: its FIX API comes with no minimum deposit or trading volume conditions. On top of that you need a FIX engine, and the open-source QuickFIX family is free.
Is FIX faster than a REST API?
Usually, yes. FIX keeps one session open and sends compact messages, while REST pays for a full HTTP request each time. Whether that matters depends on your strategy: for scalping and market making it can, for strategies that trade on bar closes or signals the spread and the broker's execution matter far more.
Which FIX version do forex brokers use?
FIX 4.4 is the de facto standard in retail forex and CFDs. Both cTrader and Swissquote, for example, use FIX 4.4.
Can I switch my existing MT4 or MT5 account to FIX?
No. A broker's FIX account is a separate account with its own login, not a setting on your MetaTrader account. Unless your broker runs a FIX plugin on its MetaTrader server, you cannot attach a FIX session to an MT4 or MT5 login.