A first look at a message layout
Open the bundled Binance Spot Streams SBE sample in the app, inspect its messages and read one of them in each of the app's views, from its declaration down to its bytes.
Binary market-data formats send raw bytes with no field names on the wire. A schema file declares where each field starts and how wide it is, and the Market Data Visualizer turns that schema into an exact byte-by-byte map. Everything runs in your browser: your files stay on your computer, and nothing is uploaded.
This walkthrough uses TradesStreamEvent, a live trade-stream message from Binance's Simple Binary Encoding (SBE) Spot Streams schema bundled with the app, so you need no file of your own for it. To open your own schema later, click Add files in the explorer on the left or drop the files onto the window. Some schemas are split across several XML files, the main one pulling in the others; add all of them together.
1. Read the message as text
Open the TradesStreamEvent message
The app opens the Binance Spot Streams project with binance_stream_1_0_sbe.xml. The pane shows TradesStreamEvent as a compact declaration:
TradesStreamEvent :: message @10000 {
eventTime: utcTimestampUs :: type int64; // UTC timestamp in microsecondsutcTimestampUs; @1
transactTime: utcTimestampUs :: type int64; // UTC timestamp in microsecondsutcTimestampUs; @2
priceExponent: exponent8 :: type int8; // Exponent for a decimal floating point number.exponent8; @3
qtyExponent: exponent8 :: type int8; // Exponent for a decimal floating point number.exponent8; @4
trades: group @100 {
id: tradeId :: type int64;tradeId; @1
price: mantissa64 :: type int64; // 64-bit mantissa for a decimal floating point number. The name of the field containing the exponent value is specified in the mbx:exponent attribute of the mantissa64 field. The exponent field will always precede the mantissa field.mantissa64; @2
qty: mantissa64 :: type int64; // 64-bit mantissa for a decimal floating point number. The name of the field containing the exponent value is specified in the mbx:exponent attribute of the mantissa64 field. The exponent field will always precede the mantissa field.mantissa64; @3
isBuyerMaker: boolEnum :: enum uint8 // 1 BboolEnum; @4
isBestMatch: boolEnum :: enum uint8 // 1 BboolEnum const = boolEnum.True; @5
}
symbol: data varString8 :: composite // Variable length UTF-8 string.varString8; @200
}Notice three things:
- The gutter on the left has two columns, named as in Symbols:
parent offset, where each field starts inside its block (the root block of fixed-size fields, or one entry of a repeating group), andsize, its bytes. @1,@2, … are the numeric field ids from the schema.- Type names are links. Hover over a type such as
utcTimestampUsormantissa64for a preview card, or click it to open its declaration.
A field whose gutter reads — and 0 occupies zero bytes on the wire. Inside the trades group, isBestMatch is a constant (boolEnum.True) whose value lives only in the schema.
2. Inspect offsets in Symbols
Click Symbols in the pane bar to switch to the tree grid. Each row is one layout node, with seven columns:
- name: the node name as an expression names it: a group's entry is
[0], a member of an entry, composite or data block.price. - type: what the row is as a keyword (
block,group,entry,data,length,bytes,const), thenenumorsetwhen its type is an enum or a set (enum boolEnum,const enum boolEnum), then its type, a link to the type declaration; a plain field shows only its type. - offset: byte start from the first byte of the root block (or the outermost framing header, when framing is active). After a part of unknown length it shows
≥ N, the earliest start; constants show—. - parent offset: byte start inside the row above it: the root block for a top-level field, the group entry, composite or data block for a member, the frame for a framing header.
- size: byte width;
≥when it may take more. - bytes: a ruler from the message's first byte to its end, each field a bar in its byte map colour, each open container a bracket; the selected row's bytes run down the column.
- note: extra facts such as a constant's value (
= boolEnum.True), an optional field, or a group's entry count.
Open TradesStreamEvent as symbols
The top row, TradesStreamEvent, is the 18-byte root block holding timestamps and decimal exponents. The trades repeating group follows at offset 18, starting with its 6-byte dimension header (groupSizeEncoding) and then its entries. The app draws one entry ([0]) by default so inner fields such as .price (offset 32 in the message, 8 in its entry) have concrete offsets (variable-sized data and lists). Variable-length symbol comes last and is shown empty. Use Up/Down to move rows and Right/Left to expand or collapse them.
3. See the bytes in the Byte map
Click Byte map in the pane bar to open a visual map beside the grid. Each row shows 8 bytes with its starting offset on the left, and each field is a labelled block.
Open the TradesStreamEvent byte map
Selection and scrolling stay synced between the map and the grid: select priceExponent in the grid to highlight byte 16, or click transactTime at the start of row 8 to select it in the grid. Hover over a column to highlight it and read its byte offset in the legend above.
Right-click a field's block, or press Shift+F10 with the map focused, to list every way its bytes read: an unsigned and a signed integer in each byte order, a float, a UTC timestamp counted in nanoseconds, microseconds or milliseconds, a decimal scaled by 10⁻⁹ as CME prices are, hex and text. Numbers appear for fields of 1, 2, 4 or 8 bytes. Click a row or press Enter to copy its value.
4. Check schema attributes in Detail
Click Detail to inspect the selected node's schema attributes (name, id, type, presence, nullValue, sinceVersion, plus venue extensions such as Binance's mbx:exponent). Clicking a type name in the value column drills into that type without leaving the pane.
Open TradesStreamEvent with its details
5. Check Diagnostics
Click Diagnostics to see schema problems. Both bundled Binance schemas load with zero diagnostics. On your own schema, each row names the problem and jumps to its source line; problem codes explains every code and fix.
Next steps
- How a binary message is put together: byte order, offsets and padding, framing, and null values on real wire bytes.
- How an SBE message is laid out: the rules behind the offsets you just read.
- Reading the XML message schema: how an SBE XML file declares types and messages.
- Variable-sized data and lists: how binary formats encode strings, blobs, and repeating lists.
- Inspect a Parquet file in the browser: the same panes on a Parquet file.
- Protocol directory: where venues publish SBE schemas.
Sources
Reviewed by Structure on 2026-11-11. Last changed 2026-11-26.