Ticks

Reference

Ticks

The raw trade/quote update a connection emits and every bar builder, order-flow aggregator and tape consumes. Namespace TradeStrike.Pipeline.Ticks.

Tick

A readonly record struct — passed by value on the hot path; the pipeline never boxes it or stores a reference. Consumers that need persistent state copy out the fields they care about.

Tick.cspublic readonly record struct Tick(
    long SequenceNumber,
    DateTime ExchangeTimestampUtc,
    string InstrumentId,
    double Price,
    long Size,
    TickFlags Flags);
Member Type Meaning
SequenceNumber long Global ordering key the framework's sequencer assigns at ingest. The canonical ordering for the whole pipeline — replay, backtest and live all use this same field.
ExchangeTimestampUtc DateTime Venue-reported timestamp of the trade/quote, in UTC.
InstrumentId string The instrument this update belongs to.
Price double Trade price, or the quoted bid/ask price (or a reference price for PreviousClose).
Size long Traded / quoted size. 0 for an informational PreviousClose reference.
Flags TickFlags Classification bitmask — see below.

TickFlags

A [Flags] enum : byte. Multiple bits can be set at once (a print at the bid is both Trade + AtBid). Bar builders consume only ticks carrying Trade; order-flow reads the aggressor bits.

TickFlags.cs[Flags]
public enum TickFlags : byte
{
    None          = 0,
    Bid           = 1 << 0,
    Ask           = 1 << 1,
    Trade         = 1 << 2,
    AtAsk         = 1 << 3,
    AtBid         = 1 << 4,
    PreviousClose = 1 << 5,
    Synthetic     = 1 << 7,
}
Value Meaning
None No classification.
Bid Quote update reflecting the best bid.
Ask Quote update reflecting the best ask.
Trade An actual trade / print. The only flag bar builders act on for OHLCV.
AtAsk Trade aggressor was a buyer (lifted the ask).
AtBid Trade aggressor was a seller (hit the bid).
PreviousClose Venue-reported previous-close reference (for futures, the prior session settlement). Informational: Price carries the reference, Size is 0, and no Trade/Bid/Ask bit is set, so flag-gated consumers ignore it. Emitted deduplicated (once on first observation, again only when it changes).
Synthetic Pipeline-injected synthetic tick (replay reconstruction, bar-builder edge cases). Indicators usually don't care.