Add Bot.h and Bot.cpp
This commit is contained in:
@ -6,33 +6,31 @@
|
||||
|
||||
class OrderBook
|
||||
{
|
||||
public:
|
||||
public:
|
||||
/** construct, reading a csv data file */
|
||||
OrderBook(std::string filename);
|
||||
OrderBook(std::string filename);
|
||||
/** return vector of all know products in the dataset*/
|
||||
std::vector<std::string> getKnownProducts();
|
||||
std::vector<std::string> getKnownProducts();
|
||||
/** return vector of Orders according to the sent filters*/
|
||||
std::vector<OrderBookEntry> getOrders(OrderBookType type,
|
||||
std::string product,
|
||||
std::string timestamp);
|
||||
std::vector<OrderBookEntry> getOrders(OrderBookType type,
|
||||
std::string product,
|
||||
std::string timestamp);
|
||||
|
||||
/** returns the earliest time in the orderbook*/
|
||||
std::string getEarliestTime();
|
||||
/** returns the next time after the
|
||||
/** returns the earliest time in the orderbook*/
|
||||
std::string getEarliestTime();
|
||||
/** returns the next time after the
|
||||
* sent time in the orderbook
|
||||
* If there is no next timestamp, wraps around to the start
|
||||
* */
|
||||
std::string getNextTime(std::string timestamp);
|
||||
std::string getNextTime(std::string timestamp);
|
||||
|
||||
void insertOrder(OrderBookEntry& order);
|
||||
void insertOrder(OrderBookEntry &order);
|
||||
|
||||
std::vector<OrderBookEntry> matchAsksToBids(std::string product, std::string timestamp);
|
||||
|
||||
static double getHighPrice(std::vector<OrderBookEntry>& orders);
|
||||
static double getLowPrice(std::vector<OrderBookEntry>& orders);
|
||||
|
||||
private:
|
||||
std::vector<OrderBookEntry> orders;
|
||||
std::vector<OrderBookEntry> matchAsksToBids(std::string product, std::string timestamp);
|
||||
|
||||
static double getHighPrice(std::vector<OrderBookEntry> &orders);
|
||||
static double getLowPrice(std::vector<OrderBookEntry> &orders);
|
||||
|
||||
private:
|
||||
std::vector<OrderBookEntry> orders;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user