Update implemented retrieveOrders

This commit is contained in:
Lev
2021-07-02 20:49:10 -05:00
parent e7e2f45f4d
commit 634be5b302
2 changed files with 96 additions and 9 deletions

View File

@ -1,18 +1,32 @@
#pragma once
#include "MerkelMain.h" // required to interact with the order book, place bids, withdraw bids, place asks
#include "MerkelMain.h" // required to interact with the order book, place bids, withdraw bids, place asks
#include "OrderBookEntry.h" // required to build vectors of this type
#include <string>
#include <iostream>
#include <vector>
#include <map>
class TradingBot
{
public:
TradingBot(MerkelMain* merkel);
void testFunc();
private:
MerkelMain* merkel;
std::vector<OrderBookEntry> bookBids;
std::vector<OrderBookEntry> bookAsks;
public:
TradingBot(MerkelMain *merkel);
/** start the Trading Bot interface */
void startBot();
void testFunc();
private:
// ===== Functions =====
// Interface functions
void printMenu();
int getUserOption();
void processUserOption(int userOption);
// Exchange functions
void retrieveOrders(); // Retrieves current orders from Merkel and stores them in bookBids and BookAsks
// ===== Variables =====
MerkelMain *merkel;
std::vector<OrderBookEntry> bookBids;
std::vector<OrderBookEntry> bookAsks;
double bidHistory = {};
};