ITCH 5.0 Market Data Handler 1.0.0
NASDAQ ITCH 5.0 Market Data Feed Handler
Loading...
Searching...
No Matches
b2bits::nasdaq::itch50 Namespace Reference

Classes

struct  ItchSettings
 ITCH 5.0 specific session settings. More...
struct  Settings
 Combined settings for ITCH 5.0 session. More...
class  Session
 ITCH 5.0 Market Data Session. More...
class  SessionHandlers
 Fluent interface wrapper for ITCH 5.0 Session event handling. More...
struct  BookTraits
 Type traits for order book aggregation. More...
class  Instrument
 Represents a single trading instrument and its order book. More...
struct  OrderbookDirectory
struct  CombinationOrderbookDirectory
struct  SystemEvent
struct  OrderBookState
struct  AddOrder
struct  OrderExecuted
struct  OrderExecutedWithPrice
struct  OrderCancelMessage
struct  OrderReplace
struct  Trade
struct  ExecutionDone
struct  Information
struct  BrokenTrade
struct  VolumeUpdate
struct  EndOfSnapshot

Typedefs

using Seqnum = Session::Seqnum
 Sequence number type alias from Session.
using Event = Session::Event
 Event type alias from Session.

Enumerations

enum struct  OrderType : char { Market = 'M' , Limit = 'L' , StopLimit = 'S' }
enum struct  TimeInForce : char { Day = 'D' , GoodTillCancel = 'G' , ImmediateOrCancel = 'I' , FillOrKill = 'F' }
enum struct  Product : UInt8 {
  USTreasury = 1 , USTreasuryBills = 2 , Reserved = 3 , TIPS = 4 ,
  AgencyBond = 5 , CorporateBond = 6 , MunicipalBond = 7
}
enum struct  ProductSubtype : UInt8 {
  Benchmark = 1 , OffTheRun = 2 , WI = 3 , Callable = 4 ,
  NonCallable = 5
}
enum struct  PriceType : char { PercentageOfPar = 'D' , Yield = 'Y' , YieldSpread = 'B' , BasisPoints = 'P' }
enum struct  IssuedAsBenchmark : UInt16 {
  Y2 = 102 , Y3 = 103 , Y5 = 105 , Y7 = 107 ,
  Y10 = 110 , Y20 = 120 , Y30 = 130 , M1 = 1 ,
  M2 = 2 , M3 = 3 , M4 = 4 , M6 = 6 ,
  M12 = 12
}
enum struct  EventCode : char {
  StartOfMessages = 'O' , StartOfTradingHours = 'Q' , EndOfTradingHours = 'M' , EndOfMessages = 'C' ,
  StartOfMMMTradingHours = 'A' , EndOfMMMTradingHours = 'a' , StartOfPostTrading = 'P' , EndOfPostTrading = 'p'
}
enum struct  EventReason : char {
  Holiday = 'I' , Break = 'A' , Resumption = 'B' , EarlyClose = 'H' ,
  Regular = 'R' , SystemMaintenance = 'S'
}
enum struct  SecurityEventCode : char {
  Enabled = 'O' , Disabled = 'M' , Halted = 'H' , MMMEnabled = 'A' ,
  MMMHalted = 'a' , MMMCrossNotActive = 'F' , MMMCrossReactivated = 'f' , PreOpen = 'P' ,
  PreClose = 'C'
}
enum struct  Boolean : char { Yes = 'Y' , No = 'N' }
enum struct  LegSide : char { AsDefined = 'B' , Opposite = 'C' }
enum struct  TradingFeatures : UInt16 {
  Reserved1 = UInt16(1) << 0 , IndicativeMarketsSupported = UInt16(1) << 2 , Reserved8 = UInt16(1) << 3 , MMMEnabled = UInt16(1) << 13 ,
  NonTradableSecurity = UInt16(1) << 14 , TestSecurity = UInt16(1) << 15
}

Functions

std::ostream & operator<< (std::ostream &os, const ItchSettings &)
 Stream output operator for ItchSettings.
template<typename F>
std::invoke_result< F, constOrderbookDirectory * >::type message_switch (const MessageHeader *h, F &&f)
 Type-safe message dispatcher.
std::string message_to_string (const MessageHeader *h)
 Convert ITCH message to human-readable string.
std::string_view to_string (OrderType v)
std::string_view to_string (TimeInForce v)
std::string_view to_string (Product v)
std::string_view to_string (ProductSubtype v)
std::string_view to_string (PriceType v)
std::string_view to_string (IssuedAsBenchmark v)
std::string_view to_string (EventCode v)
std::string_view to_string (EventReason v)
std::string_view to_string (SecurityEventCode v)
std::string_view to_string (Boolean v)
std::string_view to_string (LegSide v)

Variables

static constexpr const char * SCHEMA_VERSION_STR = "Revision 5.0,15-Mar-2024"

Typedef Documentation

◆ Event

◆ Seqnum

Sequence number type alias from Session.

Enumeration Type Documentation

◆ Boolean

enum struct b2bits::nasdaq::itch50::Boolean : char
strong
Enumerator
Yes 
No 

◆ EventCode

enum struct b2bits::nasdaq::itch50::EventCode : char
strong
Enumerator
StartOfMessages 
StartOfTradingHours 
EndOfTradingHours 
EndOfMessages 
StartOfMMMTradingHours 
EndOfMMMTradingHours 
StartOfPostTrading 
EndOfPostTrading 

◆ EventReason

enum struct b2bits::nasdaq::itch50::EventReason : char
strong
Enumerator
Holiday 
Break 
Resumption 
EarlyClose 
Regular 
SystemMaintenance 

◆ IssuedAsBenchmark

enum struct b2bits::nasdaq::itch50::IssuedAsBenchmark : UInt16
strong
Enumerator
Y2 
Y3 
Y5 
Y7 
Y10 
Y20 
Y30 
M1 
M2 
M3 
M4 
M6 
M12 

◆ LegSide

enum struct b2bits::nasdaq::itch50::LegSide : char
strong
Enumerator
AsDefined 
Opposite 

◆ OrderType

enum struct b2bits::nasdaq::itch50::OrderType : char
strong
Enumerator
Market 
Limit 
StopLimit 

◆ PriceType

enum struct b2bits::nasdaq::itch50::PriceType : char
strong
Enumerator
PercentageOfPar 
Yield 
YieldSpread 
BasisPoints 

◆ Product

enum struct b2bits::nasdaq::itch50::Product : UInt8
strong
Enumerator
USTreasury 
USTreasuryBills 
Reserved 
TIPS 
AgencyBond 
CorporateBond 
MunicipalBond 

◆ ProductSubtype

enum struct b2bits::nasdaq::itch50::ProductSubtype : UInt8
strong
Enumerator
Benchmark 
OffTheRun 
WI 
Callable 
NonCallable 

◆ SecurityEventCode

enum struct b2bits::nasdaq::itch50::SecurityEventCode : char
strong
Enumerator
Enabled 
Disabled 
Halted 
MMMEnabled 
MMMHalted 
MMMCrossNotActive 
MMMCrossReactivated 
PreOpen 
PreClose 

◆ TimeInForce

enum struct b2bits::nasdaq::itch50::TimeInForce : char
strong
Enumerator
Day 
GoodTillCancel 
ImmediateOrCancel 
FillOrKill 

◆ TradingFeatures

enum struct b2bits::nasdaq::itch50::TradingFeatures : UInt16
strong
Enumerator
Reserved1 
IndicativeMarketsSupported 
Reserved8 
MMMEnabled 
NonTradableSecurity 
TestSecurity 

Function Documentation

◆ message_switch()

template<typename F>
std::invoke_result< F, constOrderbookDirectory * >::type b2bits::nasdaq::itch50::message_switch ( const MessageHeader * h,
F && f )

Type-safe message dispatcher.

Uses compile-time dispatch to invoke a function with the appropriate message type based on the runtime message type field.

Template Parameters
FFunction/lambda type that accepts message pointers
Parameters
hMessage header containing type discriminator
fFunction to invoke with casted message pointer
Returns
Result of invoking f with the appropriate message type
Note
Returns default-constructed ReturnType for unknown message types
Example:
auto result = message_switch(header, [](auto* msg) {
return process_message(msg);
});
std::invoke_result< F, constOrderbookDirectory * >::type message_switch(const MessageHeader *h, F &&f)
Type-safe message dispatcher.
Definition Session.h:412

References _msg_case, b2bits::nasdaq::MessageHeader::get_type(), and message_switch().

Referenced by message_switch().

◆ message_to_string()

std::string b2bits::nasdaq::itch50::message_to_string ( const MessageHeader * h)

Convert ITCH message to human-readable string.

Produces a string representation of an ITCH message for logging and debugging purposes.

Parameters
hMessage header to convert
Returns
String representation of the message

References message_to_string().

Referenced by message_to_string().

◆ operator<<()

std::ostream & b2bits::nasdaq::itch50::operator<< ( std::ostream & os,
const ItchSettings &  )

Stream output operator for ItchSettings.

Parameters
osOutput stream
settingsSettings to output
Returns
Reference to the output stream

◆ to_string() [1/11]

std::string_view b2bits::nasdaq::itch50::to_string ( Boolean v)

◆ to_string() [2/11]

std::string_view b2bits::nasdaq::itch50::to_string ( EventCode v)

◆ to_string() [3/11]

std::string_view b2bits::nasdaq::itch50::to_string ( EventReason v)

◆ to_string() [4/11]

std::string_view b2bits::nasdaq::itch50::to_string ( IssuedAsBenchmark v)

◆ to_string() [5/11]

std::string_view b2bits::nasdaq::itch50::to_string ( LegSide v)

◆ to_string() [6/11]

std::string_view b2bits::nasdaq::itch50::to_string ( OrderType v)

◆ to_string() [7/11]

std::string_view b2bits::nasdaq::itch50::to_string ( PriceType v)

◆ to_string() [8/11]

std::string_view b2bits::nasdaq::itch50::to_string ( Product v)

◆ to_string() [9/11]

std::string_view b2bits::nasdaq::itch50::to_string ( ProductSubtype v)

◆ to_string() [10/11]

std::string_view b2bits::nasdaq::itch50::to_string ( SecurityEventCode v)

◆ to_string() [11/11]

std::string_view b2bits::nasdaq::itch50::to_string ( TimeInForce v)

Variable Documentation

◆ SCHEMA_VERSION_STR

const char* b2bits::nasdaq::itch50::SCHEMA_VERSION_STR = "Revision 5.0,15-Mar-2024"
staticconstexpr