FastMM documentation
FastMM C++ API 0.14.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::TradeMsg Struct Reference

A trade whose venue names the buyer and the seller carries them in the 64 bytes after the message: hdr.len is kSizeWithParties and parties() points at them. More...

#include <fastmm/core/messages.hpp>

Public Member Functions

bool has_aggressor () const noexcept
 
const TradeParties * parties () const noexcept
 
void set_parties (const TradeParties &p) noexcept
 

Public Attributes

EventHeader hdr
 
Price price
 
Qty qty
 
std::uint64_t trade_id
 
Side aggressor
 
std::uint8_t pad_ [39]
 pad_[0]: kNoAggressor
 

Static Public Attributes

static constexpr std::uint32_t kSizeWithParties = 192
 
static constexpr std::uint8_t kNoAggressor = 1
 pad_[0]: the venue does not say which side took liquidity (a CME trade with AggressorSide 0, an ITCH trade against a non-displayed order or a cross); aggressor is then Side::Buy and means nothing, so a queue model cannot tell which side's orders the print reached.
 

Detailed Description

A trade whose venue names the buyer and the seller carries them in the 64 bytes after the message: hdr.len is kSizeWithParties and parties() points at them.

Every other trade, and every trade journaled before them, is 128 bytes and parties() is null; a reader that knows nothing of them steps over the tail by hdr.len. As for BookDeltaMsg, such a trade is written in place (set_parties() needs kSizeWithParties bytes there), and a TradeMsg copied by value loses the tail: copy *parties() instead.

Member Function Documentation

◆ has_aggressor()

bool fastmm::TradeMsg::has_aggressor ( ) const
inlinenoexcept

◆ parties()

const TradeParties * fastmm::TradeMsg::parties ( ) const
inlinenoexcept

◆ set_parties()

void fastmm::TradeMsg::set_parties ( const TradeParties &  p)
inlinenoexcept

Member Data Documentation

◆ kSizeWithParties

constexpr std::uint32_t fastmm::TradeMsg::kSizeWithParties = 192
staticconstexpr

◆ kNoAggressor

constexpr std::uint8_t fastmm::TradeMsg::kNoAggressor = 1
staticconstexpr

pad_[0]: the venue does not say which side took liquidity (a CME trade with AggressorSide 0, an ITCH trade against a non-displayed order or a cross); aggressor is then Side::Buy and means nothing, so a queue model cannot tell which side's orders the print reached.

◆ hdr

EventHeader fastmm::TradeMsg::hdr

◆ price

Price fastmm::TradeMsg::price

◆ qty

Qty fastmm::TradeMsg::qty

◆ trade_id

std::uint64_t fastmm::TradeMsg::trade_id

◆ aggressor

Side fastmm::TradeMsg::aggressor

◆ pad_

std::uint8_t fastmm::TradeMsg::pad_[39]

pad_[0]: kNoAggressor