The ExchangeManager class is an abstract class that defines the interface for managing orders on an exchange.
More...
#include <ExchangeManager.h>
The ExchangeManager class is an abstract class that defines the interface for managing orders on an exchange.
◆ ExchangeManager()
◆ cancelOrder()
virtual void ats::ExchangeManager::cancelOrder |
( |
Order & |
order | ) |
|
|
pure virtual |
◆ getBalances()
virtual std::map<std::string,double> ats::ExchangeManager::getBalances |
( |
| ) |
|
|
pure virtual |
◆ getKlines()
virtual void ats::ExchangeManager::getKlines |
( |
Json::Value & |
result, |
|
|
std::string |
symbol, |
|
|
std::string |
interval, |
|
|
time_t |
start_date, |
|
|
time_t |
end_date, |
|
|
int |
limit |
|
) |
| |
|
pure virtual |
Gets Klines for a symbol.
- Parameters
-
result | Json object to write the response to |
symbol | Symbol to get the Klines for |
interval | Kline interval |
start_date | Start date |
end_date | End date |
limit | Limit, should be less than or equal to 1000 |
Implemented in ats::BinanceExchangeManager.
◆ getOpenOrders()
virtual std::vector<Order> ats::ExchangeManager::getOpenOrders |
( |
std::string |
symbol | ) |
|
|
pure virtual |
Retrieves a list of open orders on the exchange.
- Parameters
-
symbol | The symbol to get the orders for, all open orders if omitted. |
- Returns
- A vector of open orders.
Implemented in ats::BinanceExchangeManager.
◆ getOrderBook()
virtual OrderBook ats::ExchangeManager::getOrderBook |
( |
std::string |
symbol | ) |
|
|
pure virtual |
Retrieves the order book.
- Parameters
-
symbol | The symbol to retrieve the order book for. |
- Returns
- The bid and ask vectors.
Implemented in ats::BinanceExchangeManager.
◆ getOrderStatus()
virtual void ats::ExchangeManager::getOrderStatus |
( |
Order & |
order, |
|
|
Json::Value & |
result |
|
) |
| |
|
pure virtual |
Retrieves the status of an order on the exchange.
- Parameters
-
order | The order to check the status of. |
result | A Json::Value object to store the order status information. |
Implemented in ats::BinanceExchangeManager.
◆ getPrice()
virtual double ats::ExchangeManager::getPrice |
( |
std::string |
symbol | ) |
|
|
pure virtual |
Retrieves the current price for a given symbol on the exchange.
- Parameters
-
symbol | The symbol to retrieve the price for. |
- Returns
- The current price of the symbol.
Implemented in ats::BinanceExchangeManager.
◆ getTradeHistory()
virtual std::vector<Trade> ats::ExchangeManager::getTradeHistory |
( |
std::string |
symbol | ) |
|
|
pure virtual |
Retrieves the trade history for a given symbol on the exchange.
- Parameters
-
symbol | The symbol to retrieve the trade history for. |
- Returns
- A vector of Trade objects representing the trade history.
Implemented in ats::BinanceExchangeManager.
◆ modifyOrder()
virtual void ats::ExchangeManager::modifyOrder |
( |
Order & |
oldOrder, |
|
|
Order & |
newOrder |
|
) |
| |
|
pure virtual |
Modifies an existing order on the exchange.
- Parameters
-
oldOrder | The original order. |
newOrder | The modified order. |
Implemented in ats::BinanceExchangeManager.
◆ sendOrder()
virtual double ats::ExchangeManager::sendOrder |
( |
Order & |
order | ) |
|
|
pure virtual |
Sends an order to the exchange.
- Parameters
-
order | The order to be sent to the exchange. |
- Returns
- Filled quantity.
Implemented in ats::BinanceExchangeManager.
◆ mOrderManager
A reference to the OrderManager the EMS will be retrieving orders from
The documentation for this class was generated from the following files: