FIX protocol, explained

What is FIX, and why does the engine matter?

FIX (Financial Information eXchange) is the messaging protocol the financial industry uses to trade electronically. When a firm sends an order to an exchange or a liquidity provider, it almost always speaks FIX. It looks simple, plain tag=value text, but the session underneath is where correctness lives. Here is how it works, with pictures.

1. A FIX message is just tag=value

Every message is a list of numbered fields separated by a control character (SOH, shown here as |): a header saying who and what and in what order, a body, and a checksum. Numbers are compact and fast to parse.

8=FIX.4.4|35=D|34=2|49=CLIENT|56=VENUE|11=order-1|55=BTC/USD|54=1|38=1|44=65000|10=092
35
MsgType
D = New Order
34
MsgSeqNum
2
11
ClOrdID
order-1
55
Symbol
BTC/USD
54
Side
1 = Buy
44
Price
65000
one NewOrderSingle, decoded from the wire

2. FIX is a session, not request/response

Both sides open a long-lived connection and log on. They exchange heartbeats to prove the link is alive, and they number every message so neither side ever silently misses one. Orders and execution reports flow over that ordered session.

Initiator (your app)
Acceptor (the venue)
Logon · 35=A · 34=1
Logon · 34=1
Heartbeat · 35=0
NewOrderSingle · 35=D · 34=2
ExecutionReport · 35=8 · 34=2
logon handshake, a heartbeat, an order, and a fill

3. Why the right engine matters

Encoding tag=value is a weekend. The session is the hard part. Suppose message 4 never arrives, but 5 does. Watch what a correct engine does:

1
2
3
4
5
message 4 missing → ◀ ResendRequest → gap filled, sequence intact

A byte parser only

Hands you message 5 and moves on. Message 4 is silently lost, and now your positions and order state are wrong, discovered later, at the worst time.

A correct session engine

Notices the sequence gap, sends a ResendRequest, recovers message 4, and keeps your order flow consistent, automatically.

sequence-gap detection and resend recovery

That is the whole reason a real FIX engine exists. Beyond resend, it handles reconnects, duplicate detection, sequence resets, heartbeats, and strict validation, the dozen quiet edge cases that separate a demo from something you trust with real money.

Build on a FIX layer you can trust.

fixwire is a modern, fully-typed FIX engine for TypeScript, initiator and acceptor, free under MIT.

Get started on GitHub fixwire overview