Add created new OrderBook class and its functions

This commit is contained in:
Lev
2021-05-26 00:15:06 -05:00
parent 8eab127c8b
commit f5afe1866a
9 changed files with 3930 additions and 0 deletions

View File

@ -0,0 +1,29 @@
#include "OrderBookEntry.h"
OrderBookEntry::OrderBookEntry( double _price,
double _amount,
std::string _timestamp,
std::string _product,
OrderBookType _orderType)
: price(_price),
amount(_amount),
timestamp(_timestamp),
product(_product),
orderType(_orderType)
{
}
OrderBookType OrderBookEntry::stringToOrderBookType(std::string s)
{
if (s == "ask")
{
return OrderBookType::ask;
}
if (s == "bid")
{
return OrderBookType::bid;
}
return OrderBookType::unknown;
}