@@ -532,13 +532,6 @@ class EventHandlerBase : public EventHandler {
532
532
if (this ->accountBalanceRefreshWaitSeconds == 0 ) {
533
533
this ->getAccountBalances (requestList, messageTimeReceived, messageTimeReceivedISO);
534
534
}
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();
542
535
} else if (std::find (correlationIdList.begin (), correlationIdList.end (), this ->getAccountBalancesRequestCorrelationId ) != correlationIdList.end ()) {
543
536
if (this ->tradingMode == TradingMode::LIVE) {
544
537
for (const auto & element : firstMessage.getElementList ()) {
@@ -563,12 +556,6 @@ class EventHandlerBase : public EventHandler {
563
556
this ->accountBalanceCsvWriter ->flush ();
564
557
}
565
558
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 + ".");
572
559
this ->placeOrders (requestList, messageTimeReceived);
573
560
this ->numOpenOrders = requestList.size ();
574
561
}
@@ -1034,10 +1021,6 @@ class EventHandlerBase : public EventHandler {
1034
1021
this ->numOpenOrders = 0 ;
1035
1022
APP_LOGGER_INFO (" Cancel open orders." );
1036
1023
} 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();
1041
1024
this ->getAccountBalances (requestList, messageTime, messageTimeISO);
1042
1025
}
1043
1026
this ->orderRefreshLastTime = messageTime;
@@ -1362,34 +1345,6 @@ class EventHandlerBase : public EventHandler {
1362
1345
}
1363
1346
}
1364
1347
}
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
- // }
1393
1348
virtual Request createRequestForCreateOrder (const std::string& side, const std::string& price, const std::string& quantity, const TimePoint& now) {
1394
1349
Request request (Request::Operation::CREATE_ORDER, this ->exchange , this ->instrumentRest );
1395
1350
std::map<std::string, std::string> param = {
0 commit comments