Skip to content

Market Data Field Reference

This document describes how to extract market data fields from OpenFeed protocol messages. It is language-agnostic — refer to your language’s protobuf bindings for the generated types.

Message Types Overview

When subscribing to market data, you receive two types of messages:

MarketSnapshot

A MarketSnapshot contains the complete current state of all market data for an instrument. You receive a snapshot:

  • On initial subscription — When you first subscribe to a symbol, OpenFeed sends a snapshot with all available data (last price, settlement, OHLC, volume, BBO, previous session data, etc.)
  • On significant market events — Such as session rollovers, trading status changes, or when the server needs to resynchronize state

Think of a snapshot as a “full picture” of the market at a point in time. It populates all fields at once.

MarketUpdate

A MarketUpdate contains only the data that has changed since the last message. You receive updates continuously as market activity occurs:

  • A new trade executes → update with last, volume, high, low…
  • Best bid changes → update with bbo only
  • Market opens/closes → update with instrumentStatus

Updates are efficient because they only transmit what changed. Your application should apply updates incrementally on top of the last known state (initialized by the snapshot).

Recommended Pattern: Use the MarketSnapshot to build your initial quote state when you subscribe. Then, as MarketUpdate messages arrive, apply only the changed fields to your existing state. Never discard your state waiting for another snapshot — updates are designed to keep it current.


Price and Quantity Transformation

All raw price and quantity values from OpenFeed are sint64 integers. Before using them, apply the appropriate transformation using values from InstrumentDefinition:

Raw Field TypeTransformationSource
PriceDivide by 10^priceDenominatorInstrumentDefinition.priceDenominator
QuantityDivide by quantityDenominatorInstrumentDefinition.quantityDenominator
Option StrikeDivide by optionStrikeDenominatorInstrumentDefinition.optionStrikeDenominator

Protobuf Scalar Types Reference

Proto TypeDescription
sint64Signed 64-bit integer (efficient for negative values)
sint32Signed 32-bit integer
boolBoolean
stringUTF-8 encoded string
bytesArbitrary byte sequence

Field Reference

Last Trade

FieldProto TypeDescription
pricesint64Last traded price. Divide by priceDenominator
transactionTimesint64UTC timestamp in nanoseconds since Unix epoch
tradeDatesint32Date in YYYYMMDD format (e.g., 20260605)
quantitysint64Trade quantity. Divide by quantityDenominator

MarketSnapshot:

snapshot.last.price → last price
snapshot.last.transactionTime → timestamp (fallback: snapshot.last.tradeDate)
snapshot.last.quantity → last trade size

MarketUpdate:

Via trades message (batched trades):

marketUpdate.session.last.price → last price
marketUpdate.session.last.transactionTime → timestamp
marketUpdate.trades.trades[] → individual trade entries

Via standalone last message:

marketUpdate.last.price → last price
marketUpdate.last.transactionTime → timestamp
marketUpdate.last.quantity → trade size

Settlement

FieldProto TypeDescription
pricesint64Settlement price. Divide by priceDenominator
transactionTimesint64UTC timestamp in nanoseconds since Unix epoch
tradeDatesint32Trade date in YYYYMMDD format
preliminarySettlebooltrue if settlement is preliminary

MarketSnapshot:

snapshot.settlement.price → settlement price
snapshot.settlement.transactionTime → timestamp (fallback: tradeDate)
snapshot.settlement.tradeDate → trade date
snapshot.settlement.preliminarySettle → preliminary flag

MarketUpdate:

Via trades message:

marketUpdate.session.settlement.price → settlement price
marketUpdate.session.settlement.transactionTime → timestamp
marketUpdate.session.settlement.tradeDate → trade date
marketUpdate.session.settlement.preliminarySettle → preliminary flag

Via standalone settlement message:

marketUpdate.settlement.price → settlement price
marketUpdate.settlement.transactionTime → timestamp
marketUpdate.settlement.tradeDate → trade date
marketUpdate.settlement.preliminarySettle → preliminary flag

OHLC (Open, High, Low, Close)

FieldProto TypeDescription
pricesint64Price value. Divide by priceDenominator
transactionTimesint64UTC timestamp in nanoseconds since Unix epoch
tradeDatesint32Date in YYYYMMDD format

MarketSnapshot:

snapshot.open.price → opening price
snapshot.high.price → session high
snapshot.low.price → session low
snapshot.close.price → closing price
snapshot.close.transactionTime → close timestamp

MarketUpdate:

Via trades message:

marketUpdate.session.open.price → opening price
marketUpdate.session.high.price → session high
marketUpdate.session.low.price → session low

Via standalone messages:

marketUpdate.open.price → opening price
marketUpdate.high.price → session high
marketUpdate.low.price → session low
marketUpdate.close.price → closing price
marketUpdate.close.transactionTime → close timestamp

Volume and Open Interest

FieldProto TypeDescription
volumesint64Total traded volume
openInterest.volumesint64Open interest (futures/options)
numberOfTrades.numberTradessint64Number of trades in session

MarketSnapshot:

snapshot.volume.volume → session volume
snapshot.openInterest.volume → open interest
snapshot.numberOfTrades.numberTrades → trade count

MarketUpdate:

Via trades message:

marketUpdate.session.volume.volume → session volume
marketUpdate.session.openInterest.volume → open interest
marketUpdate.session.numberOfTrades.numberTrades → trade count

Via standalone messages:

marketUpdate.volume.volume → session volume
marketUpdate.openInterest.volume → open interest
marketUpdate.numberOfTrades.numberTrades → trade count

Best Bid/Offer (BBO)

FieldProto TypeDescription
bidPricesint64Best bid price. Divide by priceDenominator
bidQuantitysint64Size at best bid. Divide by quantityDenominator
bidOrderCountsint32Number of orders at best bid
offerPricesint64Best offer/ask price. Divide by priceDenominator
offerQuantitysint64Size at best offer. Divide by quantityDenominator
offerOrderCountsint32Number of orders at best offer
transactionTimesint64UTC timestamp in nanoseconds since Unix epoch

MarketSnapshot:

snapshot.bbo.bidPrice → best bid price
snapshot.bbo.bidQuantity → bid size
snapshot.bbo.bidOrderCount → bid order count
snapshot.bbo.offerPrice → best offer price
snapshot.bbo.offerQuantity → offer size
snapshot.bbo.offerOrderCount → offer order count

MarketUpdate:

marketUpdate.bbo.bidPrice → best bid price
marketUpdate.bbo.bidQuantity → bid size
marketUpdate.bbo.bidOrderCount → bid order count
marketUpdate.bbo.offerPrice → best offer price
marketUpdate.bbo.offerQuantity → offer size
marketUpdate.bbo.offerOrderCount → offer order count

Instrument Status

FieldProto TypeDescription
tradingStatusInstrumentTradingStatusCurrent trading status (enum)
priorTradingStatusInstrumentTradingStatusPrevious trading status (enum)
tradeDatesint32Current session date in YYYYMMDD format
transactionTimesint64UTC timestamp in nanoseconds since Unix epoch

MarketSnapshot:

snapshot.instrumentStatus.tradingStatus → current trading status
snapshot.instrumentStatus.priorTradingStatus → prior trading status
snapshot.instrumentStatus.tradeDate → session date (fallback: snapshot.tradeDate)
snapshot.tradeDate → feed trade date

MarketUpdate:

marketUpdate.instrumentStatus.tradingStatus → current trading status
marketUpdate.instrumentStatus.priorTradingStatus → prior trading status
marketUpdate.instrumentStatus.tradeDate → session date

InstrumentTradingStatus Enum Values

ValueCodeDescription
UNKNOWN_TRADING_STATUS0Unknown
TRADING_RESUME1Trading resumed
PRE_OPEN2Pre-market session
OPEN3Market is open for trading
PRE_CLOSE4Pre-close period
CLOSE5Market is closed
TRADING_HALT6Trading halted
QUOTATION_RESUME7Quotation resumed
OPEN_DELAY8Open delayed
NO_OPEN_NO_RESUME9No open, no resume
FAST_MARKET10Fast market conditions
FAST_MARKET_END11Fast market ended
LATE_MARKET12Late market
LATE_MARKET_END13Late market ended
POST_SESSION14Post session
POST_SESSION_END15Post session ended
NEW_PRICE_INDICATION16New price indication
NOT_AVAILABLE_FOR_TRADING17Not available for trading
PRE_CROSS18Pre-cross
CROSS19Crossing session
POST_CLOSE20Post close
NO_CHANGE21No change
LIMIT_UP_LIMIT_DOWN31Limit up/limit down

Previous Session Data

These fields contain data from the previous trading session, used for calculating change values. All are accessed via snapshot.previousSession or marketUpdate.previousSession.

Field PathProto TypeDescription
previousSession.open.pricesint64Previous session open
previousSession.high.pricesint64Previous session high
previousSession.low.pricesint64Previous session low
previousSession.last.pricesint64Previous session last trade
previousSession.last.transactionTimesint64Previous last trade timestamp
previousSession.last.quantitysint64Previous last trade size
previousSession.settlement.pricesint64Previous session settlement
previousSession.settlement.transactionTimesint64Previous settlement timestamp
previousSession.prevSettlement.pricesint64Settlement from two sessions ago
previousSession.volume.volumesint64Previous session volume
previousSession.openInterest.volumesint64Previous session open interest
previousSession.tradeDatesint32Previous session date

MarketSnapshot:

snapshot.previousSession.open.price → previous open
snapshot.previousSession.high.price → previous high
snapshot.previousSession.low.price → previous low
snapshot.previousSession.last.price → previous last
snapshot.previousSession.last.transactionTime → previous last timestamp
snapshot.previousSession.last.quantity → previous last size
snapshot.previousSession.settlement.price → previous settlement
snapshot.previousSession.settlement (date) → previous settlement date
snapshot.previousSession.prevSettlement.price → two-sessions-ago settlement
snapshot.previousSession.volume.volume → previous volume
snapshot.previousSession.openInterest.volume → previous open interest

MarketUpdate:

Via trades message — from previousSession:

marketUpdate.previousSession.last.price → previous last
marketUpdate.previousSession.last.transactionTime → previous last timestamp
marketUpdate.previousSession.settlement.price → previous settlement
marketUpdate.previousSession.open.price → previous open
marketUpdate.previousSession.high.price → previous high
marketUpdate.previousSession.low.price → previous low
marketUpdate.previousSession.volume.volume → previous volume
marketUpdate.previousSession.openInterest.volume → previous open interest

Via trades message — from current session’s prevSettlement:

marketUpdate.session.prevSettlement.price → previous settlement

MarketUpdate Message Types

MarketUpdate messages can arrive in several forms. Check which field is present to determine the update type:

1. Trades Message (Batched)

Contains session data with multiple trade entries. Most comprehensive update type.

if marketUpdate.trades is present:
// Access session data via marketUpdate.session.*
// Access previous session via marketUpdate.previousSession.*
// Individual trades in marketUpdate.trades.trades[]

2. BBO Message

Standalone best bid/offer update.

if marketUpdate.bbo is present:
// Access via marketUpdate.bbo.*

3. Standalone Field Messages

Individual field updates (one field per message):

  • marketUpdate.open — Opening price
  • marketUpdate.high — Session high
  • marketUpdate.low — Session low
  • marketUpdate.close — Closing price
  • marketUpdate.last — Last trade
  • marketUpdate.settlement — Settlement price
  • marketUpdate.openInterest — Open interest
  • marketUpdate.numberOfTrades — Trade count
  • marketUpdate.volume — Session volume
  • marketUpdate.instrumentStatus — Trading status change

4. Depth Price Level

For market depth (order book) updates:

if marketUpdate.depthPriceLevel is present:
for each level in marketUpdate.depthPriceLevel.levels:
// Each level has one of: addPriceLevel, deletePriceLevel, modifyPriceLevel

Date/Time Handling

OpenFeed provides timestamps in two formats:

transactionTime (sint64)

UTC timestamp in nanoseconds since Unix epoch.

To convert to your platform’s time representation:

milliseconds = transactionTime / 1,000,000
seconds = transactionTime / 1,000,000,000

tradeDate (sint32)

Date-only value in YYYYMMDD format.

Examples:

  • 20260605 → June 5, 2026
  • 20261231 → December 31, 2026

To parse:

year = tradeDate / 10000
month = (tradeDate / 100) % 100
day = tradeDate % 100

Example: Processing a MarketSnapshot (Pseudocode)

function processSnapshot(snapshot, instrumentDef):
priceDenom = 10 ^ instrumentDef.priceDenominator
quote.last = snapshot.last.price / priceDenom
quote.lastTime = nanosToTimestamp(snapshot.last.transactionTime)
quote.bid = snapshot.bbo.bidPrice / priceDenom
quote.ask = snapshot.bbo.offerPrice / priceDenom
quote.bidSize = snapshot.bbo.bidQuantity
quote.askSize = snapshot.bbo.offerQuantity
quote.open = snapshot.open.price / priceDenom
quote.high = snapshot.high.price / priceDenom
quote.low = snapshot.low.price / priceDenom
quote.volume = snapshot.volume.volume
quote.tradingStatus = snapshot.instrumentStatus.tradingStatus
quote.previousSettle = snapshot.previousSession.settlement.price / priceDenom
return quote

Example: Processing a MarketUpdate (Pseudocode)

function processUpdate(update, quote, priceDenom):
if update.trades is present:
// Batched trade update with session data
if update.session.last is present:
quote.last = update.session.last.price / priceDenom
quote.lastTime = nanosToTimestamp(update.session.last.transactionTime)
if update.session.high is present:
quote.high = update.session.high.price / priceDenom
if update.session.low is present:
quote.low = update.session.low.price / priceDenom
if update.session.volume is present:
quote.volume = update.session.volume.volume
else if update.bbo is present:
// BBO update
quote.bid = update.bbo.bidPrice / priceDenom
quote.ask = update.bbo.offerPrice / priceDenom
quote.bidSize = update.bbo.bidQuantity
quote.askSize = update.bbo.offerQuantity
else if update.last is present:
// Standalone last trade
quote.last = update.last.price / priceDenom
quote.lastTime = nanosToTimestamp(update.last.transactionTime)
else if update.instrumentStatus is present:
quote.tradingStatus = update.instrumentStatus.tradingStatus
// ... handle other standalone updates

Notes

  • Fields may be absent or zero when data is not available for the instrument type
  • Zero values for bidQuantity, offerQuantity, volume typically indicate no data rather than actual zero
  • The preliminarySettle flag indicates the settlement price may change before becoming final
  • previousSession.prevSettlement (settlement from two sessions ago) is useful for weekend/holiday gap calculations
  • See the full proto definitions at github.com/openfeed-org/proto