# A first look at a message layout

> Open the bundled [Binance Spot Streams SBE sample](https://structure.fi/tools/market-data-visualizer/app/#open?sample=binance-stream&guide=first-look-at-a-layout) 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.

Page: https://structure.fi/tools/market-data-visualizer/guides/first-look-at-a-layout/

Open in the Market Data Visualizer: https://structure.fi/tools/market-data-visualizer/app/#open?article=first-look-at-a-layout

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](https://structure.fi/tools/market-data-visualizer/app/#open?sample=binance-stream&node=m10000&place=text&guide=first-look-at-a-layout&section=block-3)

The app opens the Binance Spot Streams project with `binance_stream_1_0_sbe.xml`. The pane shows `TradesStreamEvent` as a compact declaration:

TradesStreamEvent in the Binance Spot Streams SBE schema, as the Market Data Visualizer's text view writes it:

```text
TradesStreamEvent :: message @10000 {
    eventTime:     utcTimestampUs;  @1
    transactTime:  utcTimestampUs;  @2
    priceExponent: exponent8;       @3
    qtyExponent:   exponent8;       @4
    trades:        group            @100 {
        id:           tradeId;                        @1
        price:        mantissa64;                     @2
        qty:          mantissa64;                     @3
        isBuyerMaker: boolEnum;                       @4
        isBestMatch:  boolEnum const = boolEnum.True; @5
    }
    symbol:        data 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), and `size`, its bytes.
- **`@1`, `@2`, …** are the numeric field ids from the schema.
- **Type names are links.** Hover over a type such as `utcTimestampUs` or `mantissa64` for 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`), then `enum` or `set` when its type is an [enum](https://structure.fi/guides/glossary/#enum) or a [set](https://structure.fi/guides/glossary/#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](https://structure.fi/tools/market-data-visualizer/app/#open?sample=binance-stream&node=m10000&place=layout&guide=first-look-at-a-layout&section=block-13)

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](https://structure.fi/guides/variable-sized-data/#sbe-count-prefixed-groups-and-length-prefixed-data)). 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](https://structure.fi/tools/market-data-visualizer/app/#open?sample=binance-stream&node=m10000&place=bytes&guide=first-look-at-a-layout&section=block-19)

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](https://structure.fi/tools/market-data-visualizer/app/#open?sample=binance-stream&node=m10000&place=detail&guide=first-look-at-a-layout&section=block-25)

## 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](https://structure.fi/tools/market-data-visualizer/guides/problem-codes.md) explains every code and fix.

## Next steps

- [How a binary message is put together](https://structure.fi/guides/binary-message/): byte order, offsets and padding, framing, and null values on real wire bytes.
- [How an SBE message is laid out](https://structure.fi/guides/sbe-message-layout/): the rules behind the offsets you just read.
- [Reading the XML message schema](https://structure.fi/guides/sbe-schema-file/): how an SBE XML file declares types and messages.
- [Variable-sized data and lists](https://structure.fi/guides/variable-sized-data/): how binary formats encode strings, blobs, and repeating lists.
- [Inspect a Parquet file in the browser](https://structure.fi/tools/market-data-visualizer/guides/inspect-parquet-file.md): the same panes on a Parquet file.
- [Protocol directory](https://structure.fi/guides/protocol-directory/): where venues publish SBE schemas.

## Sources

- https://www.fixtrading.org/standards/sbe/
- https://github.com/FIXTradingCommunity/fix-simple-binary-encoding
- https://github.com/binance/binance-spot-api-docs/blob/master/sbe/schemas/stream_1_0.xml

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