|
|
@@ -201,9 +201,10 @@ public class CoinServiceImpl implements CoinService {
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
+ Thread.sleep(5000L);
|
|
|
syncData4TraderListSub(dataList);
|
|
|
} catch (Exception e) {
|
|
|
- log.error("syncData4TraderListSub error,paramMap={},response={}", paramMap, response, e);
|
|
|
+ log.error("syncData4TraderListSub error,paramMap={},response={}", paramMap, response.toJSONString(), e);
|
|
|
}
|
|
|
|
|
|
totalNum += dataList.size();
|
|
|
@@ -341,9 +342,9 @@ public class CoinServiceImpl implements CoinService {
|
|
|
}
|
|
|
));
|
|
|
e.setRoi(columnMap.get("ROI"));
|
|
|
- e.setTotalProfit(columnMap.get("Total PnL").replace("$", "").replace(",", ""));
|
|
|
- e.setTotalFollowersProfit(columnMap.get("Total followers PnL").replace("$", "").replace(",", ""));
|
|
|
- e.setAum(columnMap.get("AUM").replace("$", "").replace(",", ""));
|
|
|
+ e.setTotalProfit(columnMap.containsKey("Total PnL") ? columnMap.get("Total PnL").replace("$", "").replace(",", "") : null);
|
|
|
+ e.setTotalFollowersProfit(columnMap.containsKey("Total followers PnL") ? columnMap.get("Total followers PnL").replace("$", "").replace(",", "") : null);
|
|
|
+ e.setAum(columnMap.containsKey("AUM") ? columnMap.get("AUM").replace("$", "").replace(",", "") : null);
|
|
|
e.setMaxCallbackRate(columnMap.get("Max drawdown"));
|
|
|
e.setLast3wWinRate(columnMap.get("Last 3W win rate"));
|
|
|
e.setAverageWinRate(StringUtils.isNotEmpty(e.getAverageWinRate()) ? new BigDecimal(e.getAverageWinRate()).setScale(2, RoundingMode.HALF_UP).toPlainString() : "0.00");
|
|
|
@@ -1069,8 +1070,9 @@ public class CoinServiceImpl implements CoinService {
|
|
|
paramMap.put("ids", StringUtils.join(watchlistMap4Coingecko.keySet(), ","));
|
|
|
paramMap.put("vs_currency", "usd");
|
|
|
AtomicInteger i = new AtomicInteger();
|
|
|
+ Connection.Response response = null;
|
|
|
try {
|
|
|
- Connection.Response response = JsoupUtil.requestBody(coingeckoCoinsMarketsUrl, JsoupUtil.HTTP_GET, InitRunner.proxy, headerMap, paramMap);
|
|
|
+ response = JsoupUtil.requestBody(coingeckoCoinsMarketsUrl, JsoupUtil.HTTP_GET, InitRunner.proxy, headerMap, paramMap);
|
|
|
JSONArray result = JSONArray.parseArray(response.body());
|
|
|
|
|
|
for (int j = 0; j < result.size(); j++) {
|
|
|
@@ -1154,7 +1156,7 @@ public class CoinServiceImpl implements CoinService {
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- log.error("parseWatchlistMap4Coingecko error,size={},i={}", watchlistMap4Coingecko.size(), i.get(), e);
|
|
|
+ log.error("parseWatchlistMap4Coingecko error,response={},size={},i={}", response != null ? response.body() : "--", watchlistMap4Coingecko.size(), i.get(), e);
|
|
|
}
|
|
|
}
|
|
|
|