Commit 6f23e58 1 parent e6553c6 commit 6f23e58 Copy full SHA for 6f23e58
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1314,20 +1314,20 @@ class EventHandlerBase : public EventHandler {
1314
1314
const std::string& quantity, const TimePoint& now) {
1315
1315
std::string clientOrderId;
1316
1316
if (this ->tradingMode == TradingMode::BACKTEST || this ->tradingMode == TradingMode::PAPER) {
1317
- clientOrderId += UtilTime::getISOTimestamp<std::chrono::seconds >(std::chrono::time_point_cast<std::chrono::seconds >(now));
1317
+ clientOrderId += UtilTime::getISOTimestamp<std::chrono::milliseconds >(std::chrono::time_point_cast<std::chrono::milliseconds >(now));
1318
1318
clientOrderId += " _" ;
1319
1319
clientOrderId += side;
1320
1320
} else {
1321
1321
if (exchange == " coinbase" ) {
1322
1322
clientOrderId = AppUtil::generateUuidV4 ();
1323
- } else if (exchange == " kraken" ) {
1324
- clientOrderId = std::to_string (std::chrono::duration_cast<std::chrono::seconds >(now.time_since_epoch ()).count ());
1323
+ } else if (exchange. rfind ( " binance " , 0 ) == 0 || exchange == " kraken" ) {
1324
+ clientOrderId = std::to_string (std::chrono::duration_cast<std::chrono::milliseconds >(now.time_since_epoch ()).count ());
1325
1325
} else if (exchange == " gateio" ) {
1326
- clientOrderId = " t-" + std::to_string (std::chrono::duration_cast<std::chrono::seconds >(now.time_since_epoch ()).count ());
1326
+ clientOrderId = " t-" + std::to_string (std::chrono::duration_cast<std::chrono::milliseconds >(now.time_since_epoch ()).count ());
1327
1327
} else {
1328
1328
clientOrderId += instrument;
1329
1329
clientOrderId += " _" ;
1330
- clientOrderId += UtilTime::getISOTimestamp<std::chrono::seconds >(std::chrono::time_point_cast<std::chrono::seconds >(now));
1330
+ clientOrderId += UtilTime::getISOTimestamp<std::chrono::milliseconds >(std::chrono::time_point_cast<std::chrono::milliseconds >(now));
1331
1331
clientOrderId += " _" ;
1332
1332
clientOrderId += side;
1333
1333
clientOrderId += " _" ;
You can’t perform that action at this time.
0 commit comments