Most retail algo traders use REST APIs. Some use WebSocket. Almost nobody uses FIX. That's because FIX has a steep learning curve and the documentation reads like aerospace engineering. But for traders who need it, FIX is irreplaceable — and LMEX supports the protocol natively.
This guide explains when FIX 4.2 makes sense, what it actually gets you over REST, and how to connect to LMEX's FIX gateway without losing a weekend to the spec.
The honest answer for most retail traders: never. REST is fine for 95% of use cases. Add WebSocket for streaming data, and you've covered everything most strategies need.
FIX is the right choice when:
**You need to place lots of orders very fast.** REST has rate limits per second. WebSocket order placement is faster but still bounded. FIX can push thousands of orders per second through a single session.
**You need sub-millisecond order acknowledgement.** REST adds 50-200ms round-trip. WebSocket reduces this to 20-50ms. FIX with co-location gets you to 1-5ms. For market making and arbitrage at scale, this matters.
**You're running multi-venue execution.** FIX is the standard protocol across traditional finance. A FIX-based system can talk to LMEX, equity venues, options venues, and FX venues using mostly the same plumbing. Multi-venue systems benefit from this consistency.
**You're running existing FIX infrastructure.** If your firm already has FIX engines for traditional markets, plugging LMEX into the existing stack is easier than building a parallel REST integration.
If none of these apply to you, use REST. The added complexity of FIX rarely pays off for typical retail strategies.
FIX (Financial Information eXchange) is a session-based, message-oriented protocol that's been the standard for institutional trading since the mid-1990s. Messages are tag-value pairs over a persistent TCP connection.
A new order might look like:
That's an `8=FIX.4.2` (protocol version), `35=D` (NewOrderSingle), `55=BTC-PERP` (symbol), `54=1` (buy), `38=0.01` (quantity), `44=60000` (price), and so on. Binary-feeling but actually plain text with `|` separators.
The session layer handles connection management, heartbeats, sequence numbers, and recovery. Application messages (orders, fills, market data) ride on top of the session.
LMEX's FIX 4.2 gateway runs on a separate endpoint from REST. The configuration parameters:
Authentication uses a Logon (35=A) message at session start with your API key and signed timestamp in custom tags.
A minimum viable session lifecycle:
1. TCP connect to fix.lmex.io:9876
2. Send Logon (35=A) with your credentials
3. Receive Logon response
4. Send/receive application messages
5. Send Logout (35=5) when done
6. Disconnect
In Python, you typically use QuickFIX or one of its derivatives:
That's the application skeleton. Configuration goes in a separate `.cfg` file specifying connection details and session parameters.
**Sequence number management is non-negotiable.** FIX uses monotonic sequence numbers per session direction. If a message is lost, the session breaks until you handle the gap (via ResendRequest 35=2 or by resetting the sequence numbers). Most FIX engines handle this automatically, but if you're rolling your own, expect to spend significant time debugging this.
**Timestamps must be in UTC and properly formatted.** YYYYMMDD-HH:MM:SS or YYYYMMDD-HH:MM:SS.sss. Local timezones cause obscure errors that take hours to diagnose.
**Tag ordering matters in some implementations.** While FIX spec doesn't require strict tag ordering, some parsers fail on unexpected orderings. Stick to the spec's canonical order for safety.
**Persistent storage is essential for recovery.** When a session disconnects, you need to know which messages were sent and acknowledged. Without persistent storage, recovery is impossible and you might double-send orders.
**Latency varies by network path.** A connection from your home is going to be much slower than one from a co-located server. If FIX latency matters, the location of your server matters as much as the protocol choice.
For order placement latency to LMEX from a well-positioned server:
The big wins are co-location plus FIX. Remote FIX is barely better than WebSocket and harder to operate. If you can't co-locate, stick with WebSocket.
Q: Do I need to use QuickFIX or can I write my own FIX engine?
Use QuickFIX (or QuickFIX-Python, QuickFIX-Java). Writing a FIX engine from scratch is a 6-month project that's a poor use of time unless you have specific requirements that existing engines don't meet. QuickFIX has been battle-tested for 20+ years and handles edge cases you'd otherwise spend months discovering.
Q: Is FIX 4.4 supported, or 5.0?
LMEX currently supports FIX 4.2. FIX 4.4 support is on the roadmap. FIX 5.0 is a more substantial protocol change and not currently planned. For most use cases, 4.2 is fully sufficient.
Q: Can I run FIX from a residential connection?
Technically yes, but the latency advantage over WebSocket largely disappears. FIX shines when combined with low-latency infrastructure. From a residential connection, you might as well use WebSocket.
Q: What's the minimum order volume that justifies FIX?
Roughly 100,000+ orders per day, or strategies where 10-20ms of order latency matters meaningfully to P&L. Below that, the operational complexity of FIX exceeds the benefit.