TradeLabs AILearn

Feed Handlers and Normalization

Feed handlers connect to exchange data feeds and convert each venue's format into one standard internal format. Learn the design, symbol mapping and common pitfalls.

Advanced3 min readUpdated 3 Oct 2026
Markdown
Lesson 24 of 27

Every exchange publishes market data in its own format. One sends JSON over WebSocket with prices as strings; another sends compact binary messages over multicast; a third names the same instrument differently and uses a different time unit. A feed handler is the component that connects to one venue's feed, decodes its messages and converts them into a single standard internal format. Everything downstream, from bar builders to strategies, then works with one consistent model regardless of where the data came from.

What a feed handler does#

TaskExample
Connect and subscribeOpen the WebSocket or join multicast groups, log on, subscribe to symbols
DecodeParse JSON, FIX or binary messages. See Binary Protocols
ValidateCheck sequence numbers and message integrity. See Sequence Numbers, Dropped Packets and Out-of-Order Messages
RecoverRequest snapshots or replays after gaps
NormaliseConvert to the internal format: instrument ID, side, price, size, timestamps
PublishPass normalised events to the rest of the system. See Message Queues
MonitorReport latency, message rates, gaps and disconnects

Normalisation: the details that matter#

FieldVenue differencesNormalised form
SymbolBTCUSDT, BTC-USDT, XBT/USD, tBTCUSDInternal instrument ID with a mapping table
PriceString, float, integer in ticks, scaled integerOne consistent numeric type
SizeBase units, contracts, lotsOne unit, with contract size known
Side"buy", "B", 1, "bid", or aggressor flagsOne enumeration
TimeSeconds, milliseconds, microseconds, nanoseconds; local or UTCUTC nanoseconds
Event typeTrade, quote, book delta, statusOne set of event types

Price representation#

Floating point numbers cannot represent many decimal prices exactly, so 0.1 plus 0.2 does not equal exactly 0.3. For research this rarely matters, but order prices must be exact multiples of the tick size. Many systems store prices as integers in tick units or as scaled integers and convert only for display. See Tick Size and Tick Value.

Symbol and reference data#

A reference data service holds each instrument's details: venue symbols, tick size, lot size, contract multiplier, trading hours and status. Feed handlers use it to map and scale values. Keeping it current is critical, because venues add, delist and change instruments frequently. See Contract Specifications.

Design principles#

Build or buy#

Writing feed handlers for a few crypto exchanges is a manageable project. Covering many traditional exchanges with binary multicast feeds is a large engineering effort, which is why firms often buy normalised data from vendors or use open source libraries that already support many venues, such as CCXT for crypto REST and WebSocket APIs.

Frequently asked questions#

What is a feed handler?#

Software that connects to a venue's market data feed, decodes its messages and converts them into a standard internal format for the rest of a trading system.

Why is data normalisation needed?#

Each venue uses different symbols, units, number formats and timestamps; normalisation lets strategies treat data from all venues the same way.

Should prices be stored as floats?#

For research floats are usually fine, but for order prices many systems use integers in tick units to avoid rounding errors.

Next, learn how sequence numbers keep feeds reliable in Sequence Numbers, Dropped Packets and Out-of-Order Messages.

Check your understanding

3 quick questions on this lesson. Get them all right to finish it.

Turn on JavaScript to take the quiz.

Finished this lesson?Sign in to save your progress across devices.
Next lessonSequence Numbers, Dropped Packets and Out-of-Order MessagesSequence numbers let trading systems detect lost, duplicated or out of order messages. Learn how gap detection, recovery and duplicate handling work in practice.

Mentioned in