Skip to content

Commit ad413ae

Browse files
committed
chore: clean up
1 parent 99db186 commit ad413ae

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

app/include/app/event_handler_base.h

-45
Original file line numberDiff line numberDiff line change
@@ -532,13 +532,6 @@ class EventHandlerBase : public EventHandler {
532532
if (this->accountBalanceRefreshWaitSeconds == 0) {
533533
this->getAccountBalances(requestList, messageTimeReceived, messageTimeReceivedISO);
534534
}
535-
// APP_LOGGER_INFO(this->baseAsset + " balance is " + baseBalanceDecimalNotation + ", " + this->quoteAsset + " balance is " +
536-
// quoteBalanceDecimalNotation +
537-
// ".");
538-
// APP_LOGGER_INFO("Best bid price is " + this->bestBidPrice + ", best bid size is " + this->bestBidSize + ", best ask price is " + this->bestAskPrice +
539-
// ", best ask size is " + this->bestAskSize + ".");
540-
// this->placeOrders(requestList, messageTimeReceived);
541-
// this->numOpenOrders = requestList.size();
542535
} else if (std::find(correlationIdList.begin(), correlationIdList.end(), this->getAccountBalancesRequestCorrelationId) != correlationIdList.end()) {
543536
if (this->tradingMode == TradingMode::LIVE) {
544537
for (const auto& element : firstMessage.getElementList()) {
@@ -563,12 +556,6 @@ class EventHandlerBase : public EventHandler {
563556
this->accountBalanceCsvWriter->flush();
564557
}
565558
if (this->numOpenOrders == 0) {
566-
// APP_LOGGER_INFO(this->baseAsset + " balance is " + baseBalanceDecimalNotation + ", " + this->quoteAsset + " balance is " +
567-
// quoteBalanceDecimalNotation +
568-
// ".");
569-
// APP_LOGGER_INFO("Best bid price is " + this->bestBidPrice + ", best bid size is " + this->bestBidSize + ", best ask price is " + this->bestAskPrice
570-
// +
571-
// ", best ask size is " + this->bestAskSize + ".");
572559
this->placeOrders(requestList, messageTimeReceived);
573560
this->numOpenOrders = requestList.size();
574561
}
@@ -1034,10 +1021,6 @@ class EventHandlerBase : public EventHandler {
10341021
this->numOpenOrders = 0;
10351022
APP_LOGGER_INFO("Cancel open orders.");
10361023
} else {
1037-
// APP_LOGGER_INFO("Best bid price is " + this->bestBidPrice + ", best bid size is " + this->bestBidSize + ", best ask price is " + this->bestAskPrice +
1038-
// ", best ask size is " + this->bestAskSize + ".");
1039-
// this->placeOrders(requestList, messageTime);
1040-
// this->numOpenOrders = requestList.size();
10411024
this->getAccountBalances(requestList, messageTime, messageTimeISO);
10421025
}
10431026
this->orderRefreshLastTime = messageTime;
@@ -1362,34 +1345,6 @@ class EventHandlerBase : public EventHandler {
13621345
}
13631346
}
13641347
}
1365-
// virtual std::string createClientOrderId(const std::string& exchange, const std::string& instrument, const std::string& side, const std::string& price,
1366-
// const std::string& quantity, const TimePoint& now) {
1367-
// std::string clientOrderId;
1368-
// if (this->tradingMode == TradingMode::BACKTEST || this->tradingMode == TradingMode::PAPER) {
1369-
// clientOrderId += UtilTime::getISOTimestamp<std::chrono::milliseconds>(std::chrono::time_point_cast<std::chrono::milliseconds>(now));
1370-
// clientOrderId += "_";
1371-
// clientOrderId += side;
1372-
// } else {
1373-
// if (exchange == "coinbase") {
1374-
// clientOrderId = AppUtil::generateUuidV4();
1375-
// } else if (exchange.rfind("binance", 0) == 0 || exchange == "kraken") {
1376-
// clientOrderId = std::to_string(std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count());
1377-
// } else if (exchange == "gateio") {
1378-
// clientOrderId = "t-" + std::to_string(std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count());
1379-
// } else {
1380-
// clientOrderId += instrument;
1381-
// clientOrderId += "_";
1382-
// clientOrderId += UtilTime::getISOTimestamp<std::chrono::milliseconds>(std::chrono::time_point_cast<std::chrono::milliseconds>(now));
1383-
// clientOrderId += "_";
1384-
// clientOrderId += side;
1385-
// clientOrderId += "_";
1386-
// clientOrderId += price;
1387-
// clientOrderId += "_";
1388-
// clientOrderId += quantity;
1389-
// }
1390-
// }
1391-
// return clientOrderId;
1392-
// }
13931348
virtual Request createRequestForCreateOrder(const std::string& side, const std::string& price, const std::string& quantity, const TimePoint& now) {
13941349
Request request(Request::Operation::CREATE_ORDER, this->exchange, this->instrumentRest);
13951350
std::map<std::string, std::string> param = {

0 commit comments

Comments
 (0)