B3 Binary UMDF: packet header, framing header, SBE messages and the schema

Learn how B3's Binary UMDF feed frames SBE market-data messages inside UDP multicast packets, how its streams and gap recovery work, what differs in its schema, and where to download it.

View as Markdown

Binary UMDF (Unified Market Data Feed) is the real-time market-data protocol of B3, Brazil's exchange for equities and derivatives. Trading firms and market-data vendors subscribe to Binary UMDF over UDP multicast for live order-book updates, trades, and statistics encoded in Simple Binary Encoding (SBE)—a lower-overhead replacement for B3's older FIX/FAST UMDF feed.

This page breaks down a Binary UMDF packet from byte 0 (its 16-byte packet header, 4-byte framing header, and SBE messages), outlines B3's channels and snapshot recovery, flags schema quirks like custom nullValue="0" types, and shows where to download B3's public XML schema.

This guide is not affiliated with or endorsed by B3; where this page and B3's Binary UMDF documents (under sources) differ, B3's documents are authoritative. See the protocol directory for B3's FAST feed and order entry.

A packet, from the first byte

Packets travel over UDP multicast, are at most 1,400 bytes, contain one or more whole messages (never fragmented across packets), and are entirely little-endian.

Packet header (16 bytes, once per packet):

  • Channel number (1 byte) + reserved (1 byte).
  • Sequence version (uint16): starts at 1 on the incremental stream and increments weekly or after failover; increments each loop on the loop streams.
  • Sequence number (uint32): increments by 1 per packet within a channel and sequence version.
  • Sending time (uint64): nanoseconds since the Unix epoch (timestamps as integers).

Each message (repeated to end of packet):

  1. 4-byte framing header (B3's compact little-endian SOFH): messageLength (uint16, total message bytes from the start of the framing header) and encoding type (uint16, always 0xEB50 for SBE 1.0 little-endian).
  2. 8-byte standard SBE message header: blockLength, templateId, schemaId, version.
  3. SBE message body (as SBE lays it out): root block, repeating groups, variable-length data. Advance by messageLength from the start of the framing header to reach the next message.

Unlike CME's MDP 3.0 schema, B3's XML actually declares PacketHeader and FramingHeader as composites, though no <message> references them—their wire order comes from B3's specification guidelines.

Channels and feeds

Instruments are divided into channels, each carrying three streams:

  • Incremental stream: real-time book updates, trades, and statistics, duplicated on Feed A and Feed B (receivers keep the first copy of each packet).
  • Instrument definition stream: repeating loop of security definitions (Feed A only).
  • Snapshot recovery stream: repeating loop of full books and latest statistics (Feed A only).

B3 also operates Feed C from its disaster recovery site.

Recovery in brief

When incremental sequence numbers show a gap, queue incoming incremental messages and read the affected instrument's snapshot from the snapshot recovery stream. Each instrument has its own rptSeq counter, and each snapshot reports the last rptSeq it includes; apply only queued messages with a higher rptSeq and the same sequence version.

What is in the schema

One SBE XML file holds all Binary UMDF templates: market-by-order book updates, trades, statistics, security definitions, security status, snapshots, and channel control messages.

Two details catch developers used to CME schemas off guard:

  • Custom nullValue="0": Int8NULL through UInt64NULL, RptSeq, and FirmOptional declare 0 as null instead of the SBE min/max defaults. Hard-coding SBE defaults misreads empty fields as zero and valid 255 values as null (null values and SBE presence and null values).
  • Two version numbers: the root element carries both wire version (sent in every header) and semanticVersion (B3's release version, e.g. 2.3.1, matching the file name and top-of-file XML change history).

Prices follow CME's fixed-exponent pattern: an int64 mantissa paired with a constant exponent (fixed-point integers).

Get the schema

  • Where: B3's public Binary UMDF developer page lists the XML schemas (e.g. b3-market-data-messages-2.3.1.xml under sources), Message Specification Guidelines, Message Reference, and sample PCAP captures for equities and derivatives.
  • Fetching: no login required; download with a browser or curl. B3's server sends no CORS header, so another website cannot fetch it directly in browser JS.
  • Licence: the XML carries no licence text and the guidelines are marked public without reuse terms; fetch directly from B3 rather than republishing.
  • Other venues: where each venue publishes its specifications, schemas and sample pcap files is in market data schemas and sample files: where to get them.

In the Market Data Visualizer

Open your copy of b3-market-data-messages-2.3.1.xml in the Market Data Visualizer to inspect all templates, offsets, groups, and versions. Pick B3 UMDF UDP packet in the Framing select of the pane bar to draw the 16-byte packet header, the 4-byte framing header and the SBE header as their own layers in front of each message (PacketHeader → repeating FramingHeader → messageHeader). With No framing, layouts start at byte 0 of the root block.

Sources

Reviewed by Structure on 2026-11-24. Last changed 2026-11-26.