26 constexpr double MAX_SAFE =
static_cast<double>(std::numeric_limits<price_t>::max()) /
PRICE_SCALE;
27 constexpr double MIN_SAFE =
static_cast<double>(std::numeric_limits<price_t>::min()) /
PRICE_SCALE;
28 if (value > MAX_SAFE || value < MIN_SAFE)
return NULL_PRICE;
37 return value ==
NULL_PRICE ? std::numeric_limits<double>::quiet_NaN() :
static_cast<double>(value) /
PRICE_SCALE;
41 return static_cast<double>(value) /
QTY_SCALE;
66 const std::vector<std::string>& instrs,
int d = 10)
double from_price_t(price_t value)
price_t to_price_t(double value)
constexpr int64_t PRICE_SCALE
constexpr bool streams_book(SubscriptionType type) noexcept
constexpr price_t NULL_PRICE
double from_qty_t(qty_t value)
constexpr int64_t QTY_SCALE
qty_t to_qty_t(double value)
SubscriptionRequest(BrokerId broker, SubscriptionType sub_type, const std::vector< std::string > &instrs, int d=10)
std::vector< std::string > instruments