Skip to content

Commit dfc30e6

Browse files
committed
Formatting and rebuilt binance jar
1 parent a658adf commit dfc30e6

File tree

5 files changed

+23
-51
lines changed

5 files changed

+23
-51
lines changed

src/main/java/com/mtheory7/wyatt/mind/Wyatt.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -272,17 +272,17 @@ public String getCurrentBalance() {
272272
return estimatedBalance.toString();
273273
}
274274

275-
/**
276-
* Return the current profit from the starting investment
277-
*
278-
* @return The current profit
279-
*/
280-
public String getCurrentProfit() {
281-
Double percentOnInvenstment =
282-
CalcUtils.roundTo(
283-
(((Double.valueOf(getCurrentBalance()) / INITIAL_INVESTMENT) * 100) - 100), 3);
284-
return percentOnInvenstment.toString();
285-
}
275+
/**
276+
* Return the current profit from the starting investment
277+
*
278+
* @return The current profit
279+
*/
280+
public String getCurrentProfit() {
281+
Double percentOnInvenstment =
282+
CalcUtils.roundTo(
283+
(((Double.valueOf(getCurrentBalance()) / INITIAL_INVESTMENT) * 100) - 100), 3);
284+
return percentOnInvenstment.toString();
285+
}
286286

287287
/**
288288
* Estimate the value of a given amount/ticker in BTC
@@ -504,10 +504,10 @@ private void executeMarketBuyBack() {
504504
new CalcUtils().sleeper(3000);
505505
Account account = client.getAccount();
506506
// Find out how much free asset there is to trade
507-
Double freeUSDTFloored =
508-
CalcUtils.floorTo(Double.valueOf(account.getAssetBalance("USDT").getFree()), 2);
509-
Double lastPrice = getCurrentPrice();
510-
Double btcToBuyFloored = CalcUtils.floorTo(freeUSDTFloored / lastPrice, 4);
507+
Double freeUSDTFloored =
508+
CalcUtils.floorTo(Double.valueOf(account.getAssetBalance("USDT").getFree()), 2);
509+
Double lastPrice = getCurrentPrice();
510+
Double btcToBuyFloored = CalcUtils.floorTo(freeUSDTFloored / lastPrice, 4);
511511
String message = "Executing market buy back of " + btcToBuyFloored + " BTC @ $" + lastPrice;
512512
logger.info(message);
513513
sendTweet(message);

src/main/java/com/mtheory7/wyatt/model/DataIdentifier.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,7 @@ public CandlestickInterval getInterval() {
1515
return interval;
1616
}
1717

18-
public void setInterval(CandlestickInterval interval) {
19-
this.interval = interval;
20-
}
21-
2218
public String getTicker() {
2319
return ticker;
2420
}
25-
26-
public void setTicker(String ticker) {
27-
this.ticker = ticker;
28-
}
2921
}

src/main/java/com/mtheory7/wyatt/model/data/MindData.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,4 @@ public MindData() {
2121
public HashMap<DataIdentifier, List<Candlestick>> getCandlestickData() {
2222
return candlestickData;
2323
}
24-
25-
public void setCandlestickData(HashMap<DataIdentifier, List<Candlestick>> candlestickData) {
26-
this.candlestickData = candlestickData;
27-
}
28-
29-
public HashMap<DataIdentifier, TickerStatistics> getLastPriceData() {
30-
return lastPriceData;
31-
}
32-
33-
public void setLastPriceData(HashMap<DataIdentifier, TickerStatistics> lastPriceData) {
34-
this.lastPriceData = lastPriceData;
35-
}
36-
37-
public HashMap<DataIdentifier, Double> getCandlestickIntAvgData() {
38-
return candlestickIntAvgData;
39-
}
40-
41-
public void setCandlestickIntAvgData(HashMap<DataIdentifier, Double> candlestickIntAvgData) {
42-
this.candlestickIntAvgData = candlestickIntAvgData;
43-
}
4424
}

src/main/java/com/mtheory7/wyatt/utils/CalcUtils.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ public static double floorTo(double num, int places) {
1515
return Math.floor(num * Math.pow(10, places)) / Math.pow(10, places);
1616
}
1717

18-
public static String getUpTimeString() {
19-
RuntimeMXBean rb = ManagementFactory.getRuntimeMXBean();
20-
long seconds = rb.getUptime() / 1000;
21-
long minutes = seconds / 60;
22-
long hours = minutes / 60;
23-
long days = hours / 24;
24-
return days + "d " + hours % 24 + "h " + minutes % 60 + "m " + seconds % 60 + "s";
25-
}
18+
public static String getUpTimeString() {
19+
RuntimeMXBean rb = ManagementFactory.getRuntimeMXBean();
20+
long seconds = rb.getUptime() / 1000;
21+
long minutes = seconds / 60;
22+
long hours = minutes / 60;
23+
long days = hours / 24;
24+
return days + "d " + hours % 24 + "h " + minutes % 60 + "m " + seconds % 60 + "s";
25+
}
2626

2727
public Double findAveragePrice(List<Candlestick> candlesticks) {
2828
if (candlesticks.size() == 0) return 0.0;
-1 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)