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

Namespace alias for SoupBinTCP protocol. More...

Detailed Description

Namespace alias for SoupBinTCP protocol.

Namespace alias for MoldUDP64 protocol

Namespaces

namespace  itch50
namespace  moldudp64
namespace  soupbintcp

Classes

class  MessageHeader
 Base class for all NASDAQ protocol messages. More...
struct  MsgT
 Message adapter template. More...
class  MessageBlock
 Compile-time validation of RequestPacket wire format size. More...
class  SequencedData
 Sequenced data packet ('S'). More...
class  UnsequencedData
 Unsequenced data packet ('U'). More...

Typedefs

using Price = Int64
 < String reference type
using OrderbookID = UInt32
 NASDAQ orderbook identifier.
template<class M>
using UDPMessage = MsgT<MessageBlock, M>
 < SoupBinTCP unsequenced data header
template<class M>
using SequencedMessage = MsgT<SequencedData, M>
 TCP sequenced message adapter.
template<class M>
using UnsequencedMessage = MsgT<UnsequencedData, M>
 TCP unsequenced message adapter.

Enumerations

enum struct  Side : char { Buy = 'B' , Sell = 'S' , Both = 'A' }
 Order side enumeration. More...

Functions

std::string_view to_string (Side v)
 Convert Side enum to string representation.
template<typename Message>
std::enable_if< std::is_base_of< MessageHeader, Message >::value, std::ostream & >::type operator<< (std::ostream &os, const Message &m)
 Stream output operator for messages.
constexpr std::uint64_t calculate_ratio (std::uint16_t num_decimals)
 Calculate decimal ratio for price conversion.

Variables

static constexpr Price ZERO_PRICE = -1
 Special value indicating no valid price (used for cleared/unknown prices).

Typedef Documentation

◆ OrderbookID

NASDAQ orderbook identifier.

◆ Price

using b2bits::nasdaq::Price = Int64

< String reference type

Price representation (64-bit fixed-point)

◆ SequencedMessage

template<class M>
using b2bits::nasdaq::SequencedMessage = MsgT<SequencedData, M>

TCP sequenced message adapter.

Template Parameters
MITCH message type

◆ UDPMessage

template<class M>
using b2bits::nasdaq::UDPMessage = MsgT<MessageBlock, M>

< SoupBinTCP unsequenced data header

UDP/Multicast message adapter

Template Parameters
MITCH message type

◆ UnsequencedMessage

TCP unsequenced message adapter.

Template Parameters
MITCH message type

Enumeration Type Documentation

◆ Side

enum struct b2bits::nasdaq::Side : char
strong

Order side enumeration.

Indicates whether an order is on the buy side, sell side, or applies to both sides of the market.

Enumerator
Buy 

Buy order (bid side).

Sell 

Sell order (ask/offer side).

Both 

Both sides (used for certain market data).

Function Documentation

◆ calculate_ratio()

std::uint64_t b2bits::nasdaq::calculate_ratio ( std::uint16_t num_decimals)
inlineconstexpr

Calculate decimal ratio for price conversion.

Recursively calculates 10^n where n is the number of decimal places needed to convert from internal fixed-point representation to decimal.

Parameters
num_decimalsNumber of decimal places (must be valid)
Returns
Power of 10 for the given decimal places
Note
This is a compile-time constant expression when possible

References calculate_ratio(), b2bits::constants::detail::num_price_decimals(), b2bits::constants::SBE_PRICE_MULTIPLIER, and b2bits::constants::detail::validate_num_price_decimals().

Referenced by calculate_ratio().

◆ operator<<()

template<typename Message>
std::enable_if< std::is_base_of< MessageHeader, Message >::value, std::ostream & >::type b2bits::nasdaq::operator<< ( std::ostream & os,
const Message & m )

Stream output operator for messages.

Enables streaming of any message type that derives from MessageHeader and implements a to_string() method.

Template Parameters
MessageMessage type (must derive from MessageHeader)
Parameters
osOutput stream
mMessage to output
Returns
Reference to the output stream
Note
Uses SFINAE to enable only for MessageHeader-derived types

◆ to_string()

std::string_view b2bits::nasdaq::to_string ( Side v)

Convert Side enum to string representation.

Parameters
vSide enum value
Returns
String view containing "Buy", "Sell", or "Both"

Variable Documentation

◆ ZERO_PRICE

Price b2bits::nasdaq::ZERO_PRICE = -1
staticconstexpr

Special value indicating no valid price (used for cleared/unknown prices).