From 0f3913b7a19df6d3e2b6b0c6441a703b512cd99f Mon Sep 17 00:00:00 2001 From: Dennis Thiessen Date: Thu, 1 Jun 2017 21:05:02 +0200 Subject: [PATCH] Initial Commit --- .idea/compiler.xml | 16 + ...om_google_protobuf_protobuf_java_2_6_0.xml | 13 + ...com_mashape_unirest_unirest_java_1_4_9.xml | 13 + ...com_thoughtworks_xstream_xstream_1_4_9.xml | 13 + ...Maven__commons_codec_commons_codec_1_6.xml | 13 + ..._commons_logging_commons_logging_1_1_3.xml | 13 + .../Maven__joda_time_joda_time_2_9_9.xml | 13 + .../Maven__org_antlr_antlr_runtime_3_5.xml | 13 + ...org_apache_commons_commons_math3_3_6_1.xml | 13 + ...e_httpcomponents_httpasyncclient_4_0_2.xml | 13 + ...apache_httpcomponents_httpclient_4_3_6.xml | 13 + ...g_apache_httpcomponents_httpcore_4_3_3.xml | 13 + ...ache_httpcomponents_httpcore_nio_4_3_2.xml | 13 + ...g_apache_httpcomponents_httpmime_4_3_6.xml | 13 + ...org_drools_drools_compiler_6_5_0_Final.xml | 13 + ...en__org_drools_drools_core_6_5_0_Final.xml | 13 + ...rg_eclipse_jdt_core_compiler_ecj_4_4_2.xml | 13 + .../Maven__org_json_json_20140107.xml | 13 + .../Maven__org_kie_kie_api_6_5_0_Final.xml | 13 + ...aven__org_kie_kie_internal_6_5_0_Final.xml | 13 + .../Maven__org_mvel_mvel2_2_2_8_Final.xml | 13 + .../Maven__org_slf4j_slf4j_api_1_7_2.xml | 13 + .../Maven__xmlpull_xmlpull_1_1_3_1.xml | 13 + .../libraries/Maven__xpp3_xpp3_min_1_1_4c.xml | 13 + .idea/misc.xml | 13 + .idea/modules.xml | 8 + .idea/uiDesigner.xml | 124 +++ .idea/workspace.xml | 850 ++++++++++++++++++ dekaBot.iml | 38 + pom.xml | 86 ++ src/main/java/CryptoCoin.java | 11 + src/main/java/Funds.java | 41 + src/main/java/Main.java | 321 +++++++ src/main/java/Order.java | 15 + src/main/java/OrderHistory.java | 25 + src/main/java/Trade.java | 15 + src/main/java/TradeHistory.java | 77 ++ src/main/resources/simpleRule.drl | 8 + target/classes/CryptoCoin.class | Bin 0 -> 517 bytes target/classes/Funds.class | Bin 0 -> 2090 bytes target/classes/Main.class | Bin 0 -> 10791 bytes target/classes/Order.class | Bin 0 -> 418 bytes target/classes/OrderHistory.class | Bin 0 -> 773 bytes target/classes/Trade.class | Bin 0 -> 558 bytes target/classes/TradeHistory.class | Bin 0 -> 2645 bytes target/classes/simpleRule.drl | 8 + 46 files changed, 1955 insertions(+) create mode 100644 .idea/compiler.xml create mode 100644 .idea/libraries/Maven__com_google_protobuf_protobuf_java_2_6_0.xml create mode 100644 .idea/libraries/Maven__com_mashape_unirest_unirest_java_1_4_9.xml create mode 100644 .idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_9.xml create mode 100644 .idea/libraries/Maven__commons_codec_commons_codec_1_6.xml create mode 100644 .idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml create mode 100644 .idea/libraries/Maven__joda_time_joda_time_2_9_9.xml create mode 100644 .idea/libraries/Maven__org_antlr_antlr_runtime_3_5.xml create mode 100644 .idea/libraries/Maven__org_apache_commons_commons_math3_3_6_1.xml create mode 100644 .idea/libraries/Maven__org_apache_httpcomponents_httpasyncclient_4_0_2.xml create mode 100644 .idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_6.xml create mode 100644 .idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_3.xml create mode 100644 .idea/libraries/Maven__org_apache_httpcomponents_httpcore_nio_4_3_2.xml create mode 100644 .idea/libraries/Maven__org_apache_httpcomponents_httpmime_4_3_6.xml create mode 100644 .idea/libraries/Maven__org_drools_drools_compiler_6_5_0_Final.xml create mode 100644 .idea/libraries/Maven__org_drools_drools_core_6_5_0_Final.xml create mode 100644 .idea/libraries/Maven__org_eclipse_jdt_core_compiler_ecj_4_4_2.xml create mode 100644 .idea/libraries/Maven__org_json_json_20140107.xml create mode 100644 .idea/libraries/Maven__org_kie_kie_api_6_5_0_Final.xml create mode 100644 .idea/libraries/Maven__org_kie_kie_internal_6_5_0_Final.xml create mode 100644 .idea/libraries/Maven__org_mvel_mvel2_2_2_8_Final.xml create mode 100644 .idea/libraries/Maven__org_slf4j_slf4j_api_1_7_2.xml create mode 100644 .idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml create mode 100644 .idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/uiDesigner.xml create mode 100644 .idea/workspace.xml create mode 100644 dekaBot.iml create mode 100644 pom.xml create mode 100644 src/main/java/CryptoCoin.java create mode 100644 src/main/java/Funds.java create mode 100644 src/main/java/Main.java create mode 100644 src/main/java/Order.java create mode 100644 src/main/java/OrderHistory.java create mode 100644 src/main/java/Trade.java create mode 100644 src/main/java/TradeHistory.java create mode 100644 src/main/resources/simpleRule.drl create mode 100644 target/classes/CryptoCoin.class create mode 100644 target/classes/Funds.class create mode 100644 target/classes/Main.class create mode 100644 target/classes/Order.class create mode 100644 target/classes/OrderHistory.class create mode 100644 target/classes/Trade.class create mode 100644 target/classes/TradeHistory.class create mode 100644 target/classes/simpleRule.drl diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..bbf2bd3 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_protobuf_protobuf_java_2_6_0.xml b/.idea/libraries/Maven__com_google_protobuf_protobuf_java_2_6_0.xml new file mode 100644 index 0000000..7ced7e4 --- /dev/null +++ b/.idea/libraries/Maven__com_google_protobuf_protobuf_java_2_6_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mashape_unirest_unirest_java_1_4_9.xml b/.idea/libraries/Maven__com_mashape_unirest_unirest_java_1_4_9.xml new file mode 100644 index 0000000..d7792cc --- /dev/null +++ b/.idea/libraries/Maven__com_mashape_unirest_unirest_java_1_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_9.xml b/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_9.xml new file mode 100644 index 0000000..1922b11 --- /dev/null +++ b/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_codec_commons_codec_1_6.xml b/.idea/libraries/Maven__commons_codec_commons_codec_1_6.xml new file mode 100644 index 0000000..e8a6a9f --- /dev/null +++ b/.idea/libraries/Maven__commons_codec_commons_codec_1_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml b/.idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml new file mode 100644 index 0000000..01c7b8e --- /dev/null +++ b/.idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__joda_time_joda_time_2_9_9.xml b/.idea/libraries/Maven__joda_time_joda_time_2_9_9.xml new file mode 100644 index 0000000..a468f58 --- /dev/null +++ b/.idea/libraries/Maven__joda_time_joda_time_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_antlr_antlr_runtime_3_5.xml b/.idea/libraries/Maven__org_antlr_antlr_runtime_3_5.xml new file mode 100644 index 0000000..6d3a0f6 --- /dev/null +++ b/.idea/libraries/Maven__org_antlr_antlr_runtime_3_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_commons_commons_math3_3_6_1.xml b/.idea/libraries/Maven__org_apache_commons_commons_math3_3_6_1.xml new file mode 100644 index 0000000..ebfe0a8 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_commons_commons_math3_3_6_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpasyncclient_4_0_2.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpasyncclient_4_0_2.xml new file mode 100644 index 0000000..8664f17 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpasyncclient_4_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_6.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_6.xml new file mode 100644 index 0000000..04cad1e --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_3.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_3.xml new file mode 100644 index 0000000..a821fc2 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_nio_4_3_2.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_nio_4_3_2.xml new file mode 100644 index 0000000..f8b72d4 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_nio_4_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpmime_4_3_6.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpmime_4_3_6.xml new file mode 100644 index 0000000..ef74cf0 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpmime_4_3_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_drools_drools_compiler_6_5_0_Final.xml b/.idea/libraries/Maven__org_drools_drools_compiler_6_5_0_Final.xml new file mode 100644 index 0000000..3432243 --- /dev/null +++ b/.idea/libraries/Maven__org_drools_drools_compiler_6_5_0_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_drools_drools_core_6_5_0_Final.xml b/.idea/libraries/Maven__org_drools_drools_core_6_5_0_Final.xml new file mode 100644 index 0000000..4fd4384 --- /dev/null +++ b/.idea/libraries/Maven__org_drools_drools_core_6_5_0_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_eclipse_jdt_core_compiler_ecj_4_4_2.xml b/.idea/libraries/Maven__org_eclipse_jdt_core_compiler_ecj_4_4_2.xml new file mode 100644 index 0000000..98a6916 --- /dev/null +++ b/.idea/libraries/Maven__org_eclipse_jdt_core_compiler_ecj_4_4_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_json_json_20140107.xml b/.idea/libraries/Maven__org_json_json_20140107.xml new file mode 100644 index 0000000..0092a09 --- /dev/null +++ b/.idea/libraries/Maven__org_json_json_20140107.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_kie_kie_api_6_5_0_Final.xml b/.idea/libraries/Maven__org_kie_kie_api_6_5_0_Final.xml new file mode 100644 index 0000000..f844c06 --- /dev/null +++ b/.idea/libraries/Maven__org_kie_kie_api_6_5_0_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_kie_kie_internal_6_5_0_Final.xml b/.idea/libraries/Maven__org_kie_kie_internal_6_5_0_Final.xml new file mode 100644 index 0000000..f697a0b --- /dev/null +++ b/.idea/libraries/Maven__org_kie_kie_internal_6_5_0_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mvel_mvel2_2_2_8_Final.xml b/.idea/libraries/Maven__org_mvel_mvel2_2_2_8_Final.xml new file mode 100644 index 0000000..465d3dc --- /dev/null +++ b/.idea/libraries/Maven__org_mvel_mvel2_2_2_8_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_2.xml b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_2.xml new file mode 100644 index 0000000..7d29533 --- /dev/null +++ b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml b/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml new file mode 100644 index 0000000..0f2d9ef --- /dev/null +++ b/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml b/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml new file mode 100644 index 0000000..6726a2d --- /dev/null +++ b/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..e8942bd --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..548dd52 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..15f8787 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,850 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + doOrder + calculateTrend + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1495743885678 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No facets are configured + + + + + + + + + + + + + + + 1.8 + + + + + + + + dekaBot + + + + + + + + Maven: com.mashape.unirest:unirest-java:1.4.9 + + + + + + + + \ No newline at end of file diff --git a/dekaBot.iml b/dekaBot.iml new file mode 100644 index 0000000..1ae8f14 --- /dev/null +++ b/dekaBot.iml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..5e6cf19 --- /dev/null +++ b/pom.xml @@ -0,0 +1,86 @@ + + + 4.0.0 + + my + dekaBot + 1.0-SNAPSHOT + + + 6.5.0.Final + + + + + jboss-public-repository-group + JBoss Public Repository Group + http://repository.jboss.org/nexus/content/groups/public/ + + true + never + + + true + daily + + + + + + + com.mashape.unirest + unirest-java + 1.4.9 + + + + org.apache.httpcomponents + httpclient + 4.3.6 + + + org.apache.httpcomponents + httpasyncclient + 4.0.2 + + + org.apache.httpcomponents + httpmime + 4.3.6 + + + org.apache.commons + commons-math3 + 3.6.1 + + + org.json + json + 20140107 + + + org.drools + drools-core + ${runtime.version} + + + org.drools + drools-compiler + ${runtime.version} + + + joda-time + joda-time + 2.9.9 + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/CryptoCoin.java b/src/main/java/CryptoCoin.java new file mode 100644 index 0000000..a1e3979 --- /dev/null +++ b/src/main/java/CryptoCoin.java @@ -0,0 +1,11 @@ +public class CryptoCoin { + public String shortname; + public double price; + public double change5Min; + + public CryptoCoin(String shortname, Double price){ + this.shortname = shortname; + this.price = price; + } + +} diff --git a/src/main/java/Funds.java b/src/main/java/Funds.java new file mode 100644 index 0000000..f96a5bb --- /dev/null +++ b/src/main/java/Funds.java @@ -0,0 +1,41 @@ +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Created by dennis on 28.05.2017. + */ +public class Funds { + Map funds = new HashMap(); + + public Funds(){ + + } + + + public void addFund(String name, double value){ + funds.put(name, value); + } + + public double getValue(String name){ + return funds.get(name); + } + + public void takeValue(String name, double value){ + funds.put(name, funds.get(name)-value); + } + + public void addValue(String name, double value){ + funds.put(name, funds.get(name)+value); + } + + public String getFundsStringOutput(){ + String returnValue = "Funds: "; + + for(Map.Entry entry : funds.entrySet()){ + returnValue += entry.getKey()+" : "+entry.getValue()+" "; + } + + return returnValue; + } +} diff --git a/src/main/java/Main.java b/src/main/java/Main.java new file mode 100644 index 0000000..9e68ce4 --- /dev/null +++ b/src/main/java/Main.java @@ -0,0 +1,321 @@ +import com.mashape.unirest.http.HttpResponse; +import com.mashape.unirest.http.JsonNode; +import com.mashape.unirest.http.Unirest; +import com.mashape.unirest.http.exceptions.UnirestException; +import org.apache.commons.math3.stat.regression.SimpleRegression; +import org.json.JSONArray; +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.Scanner; + +public class Main { + + static SimpleRegression srbuyvolume = new SimpleRegression(true); + static SimpleRegression srsellvolume = new SimpleRegression(true); + static SimpleRegression srprice = new SimpleRegression(true); + + static ArrayList list = new ArrayList(); + static OrderHistory orders = new OrderHistory(); + public static Funds funds = new Funds(); + public static TradeHistory trades; + + public static double buyvslope = 0.0; + public static double sellvslope = 0.0; + public static double priceslope = 0.0; + public static int buyindicator = 0; + public static double currentPrice = 0.0; + static int counter = 0; + + public static int counterbuys = 0; + public static int countersells = 0; + public static int counterneutrals = 0; + + public static void main(String [ ] args) throws InterruptedException { + System.out.println("Starting DekaBot..."); + Scanner in = new Scanner(System.in); + + System.out.println("Start simulation? (y/n)"); + String s = in.next(); + + long sinceid = 0L; + + if(s.equals("y")){ + try{ + HttpResponse jsonResponse = Unirest.post("https://api.kraken.com/0/public/Trades") + .header("accept", "application/json") + .queryString("pair", "ETHEUR") + .asJson(); + + sinceid = jsonResponse.getBody().getObject().getJSONObject("result").getLong("last"); + }catch(UnirestException ue){ + System.out.println("Could not establish connection."); + return; + } + + + System.out.println("Starting simulation... initializing Funds..."); + + funds.addFund("ETH", 0.0); + funds.addFund("EUR", 3000); + + try{ + sendStats(); + }catch(UnirestException ue){ + System.out.println("Could not send stats - just continue"); + } + + + System.out.println(funds.getFundsStringOutput()); + + while(true){ + Thread.sleep(20000); + + sinceid = analyzeVolume(sinceid); + analyzePrice(); + + System.out.println("Trend: "+calculateTrend_2()+" // Price: "+currentPrice); + + if(((counter % 6) == 0) && (counter != 0)){ + Order order = decide(); + + if(order.ordertype != null) doOrder(order); + + buyindicator = 0; + System.out.println("Funds: "+funds.getFundsStringOutput()); + + srbuyvolume.clear(); + srsellvolume.clear(); + srprice.clear(); + } + + counter++; + System.out.println("-------"+counter+"-------"); + } + } + } + + private static void doOrder(Order order){ + if(order.ordertype.equals("buy")){ + if(Double.compare(funds.getValue("EUR"),0) > 0) { + orders.addOrder(order); + + funds.addValue("ETH", funds.getValue("EUR") / currentPrice); + funds.takeValue("EUR", funds.getValue("EUR")); + + counterbuys++; + }else{ + System.out.println("Would like to buy but conditions not met (out of funds)"); + } + }else if(order.ordertype.equals("sell")){ + if(Double.compare(funds.getValue("ETH"),0) > 0){ + orders.addOrder(order); + + funds.addValue("EUR", funds.getValue("ETH") * currentPrice); + funds.takeValue("ETH", funds.getValue("ETH")); + + countersells++; + }else{ + System.out.println("Would like to sell but conditions not met (out of funds)"); + } + }else{ + System.out.println("ERROR: Order not recoginized: "+order.type); + } + + try{ + sendStats(); + }catch(UnirestException ue){ + System.out.println("Error sending stats - just continue..."); + } + } + + private static void sendStats() throws UnirestException { + HttpResponse jsonResponse = Unirest.post("https://www.riskahead.de/api/v1/deka/updatestats/") + .header("accept", "application/json") + .queryString("app_id", "den_deka_2_6") + .field("funds_start", "EUR: 3000") + .field("funds_current", funds.getFundsStringOutput()) + .field("trades_buy", counterbuys) + .field("trades_sell", countersells) + .field("trades_neutral", counterneutrals) + .asJson(); + } + + private static Order decide() { + Order newOrder = new Order(); + newOrder.price = currentPrice; + + if(buyindicator > 6){ + + System.out.println("BUY NOW - PRICE: "+currentPrice); + newOrder.ordertype = "buy"; + + }else if(buyindicator > -6){ + System.out.println("DO NOTHING - NEUTRAL: "+currentPrice); + counterneutrals++; + }else{ + if(orders.getLastOrder() == null || Double.compare(orders.getLastOrder().price,currentPrice*0.995) < 0 || Double.compare(orders.getLastOrder().price,currentPrice*0.985) > 0){ + + System.out.println("SELL NOW - PRICE: "+currentPrice); + newOrder.ordertype = "sell"; + + }else{ + System.out.println("Would like to sell but percentage not reached"); + } + } + + return newOrder; + } + + private static void analyzePrice() { + try{ + HttpResponse jsonResponse; + jsonResponse = Unirest.post("https://min-api.cryptocompare.com/data/price?fsym=ETH&tsyms=BTC,USD,EUR") + .header("accept", "application/json") + .queryString("fsyn", "ETH") + .field("tsyms", "BTC,USD,EUR") + .asJson(); + + + currentPrice = jsonResponse.getBody().getObject().getDouble("EUR"); + + srprice.addData((double)counter,currentPrice); + System.out.printf("Current price slope: %.3f \n",srprice.getSlope()); + }catch(UnirestException ue){ + System.out.println("Exception was thrown - just continue and ignore"); + } + } + + private static String calculateTrend(){ + if((Double.compare(buyvslope, 0) > 0) && (Double.compare(priceslope, 0) > 0)){ + if(Double.compare(trades.volumeOfBuyTrades, trades.volumeOfSellTrades) > 0){ + buyindicator += 3; + return "strong buy"; + }else{ + buyindicator += 2; + return "normal buy"; + } + }else if((Double.compare(sellvslope, 0) > 0) && (Double.compare(priceslope, 0) < 0)){ + if(Double.compare(trades.volumeOfBuyTrades, trades.volumeOfSellTrades) < 0){ + buyindicator -= 3; + return "strong sell"; + }else{ + buyindicator -= 2; + return "normal sell"; + } + }else if(Double.compare(buyvslope, sellvslope) > 0 && (Double.compare(priceslope, 0) > 0)){ + buyindicator += 1; + return "weak buy"; + }else if(Double.compare(buyvslope, sellvslope) < 0 && (Double.compare(priceslope, 0) < 0)){ + buyindicator -= 1; + return "weak sell"; + }else{ + return "neutral"; + } + } + + private static String calculateTrend_2(){ + if((Double.compare(priceslope, 0.1) > 0)){ + if((Double.compare(trades.volumeOfBuyTrades, trades.volumeOfSellTrades) > 0) && (Double.compare(buyvslope, 0) > 0) && (Double.compare(sellvslope, 0) < 0)){ + buyindicator += 5; + return "strong buy"; + }else if((Double.compare(trades.volumeOfBuyTrades, trades.volumeOfSellTrades) > 0) && (Double.compare(buyvslope, 0) > 0)){ + buyindicator += 3; + return "normal buy"; + }else{ + buyindicator += 1; + return "weak buy"; + } + }else if((Double.compare(priceslope, 0.0) < 0)){ + if((Double.compare(trades.volumeOfBuyTrades, trades.volumeOfSellTrades) < 0) && (Double.compare(buyvslope, 0) < 0) && (Double.compare(sellvslope, 0) > 0)){ + buyindicator -= 5; + return "strong sell"; + }else if((Double.compare(trades.volumeOfBuyTrades, trades.volumeOfSellTrades) < 0) && (Double.compare(sellvslope, 0) > 0)){ + buyindicator -= 3; + return "normal sell"; + }else{ + buyindicator -= 1; + return "weak sell"; + } + }else{ + return "neutral"; + } + } + + private static long analyzeVolume(long sinceid) { + try{ + HttpResponse jsonResponse; + jsonResponse = Unirest.post("https://api.kraken.com/0/public/Trades") + .header("accept", "application/json") + .queryString("pair", "ETHEUR") + .field("since", sinceid) + .asJson(); + + JSONArray array = jsonResponse.getBody().getObject().getJSONObject("result").getJSONArray("XETHZEUR"); + sinceid = jsonResponse.getBody().getObject().getJSONObject("result").getLong("last"); + trades = new TradeHistory(array,sinceid); + + System.out.print("Number of buy trades: "+trades.numberOfBuyTrades); + System.out.printf(" - Volume of buy trades: %.3f \n",trades.volumeOfBuyTrades); + System.out.print("Number of sell trades: "+trades.numberOfSellTrades); + System.out.printf(" - Volume of sell trades: %.3f \n",trades.volumeOfSellTrades); + System.out.println("Timeframe in sec: "+trades.timeframesec); + + srbuyvolume.addData((double) counter,trades.volumeOfBuyTrades); + System.out.printf("buy volume slope: %.3f //",srbuyvolume.getSlope()); + + srsellvolume.addData((double) counter,trades.volumeOfSellTrades); + System.out.printf("sell volume slope: %.3f \n",srsellvolume.getSlope()); + + priceslope = srprice.getSlope(); + buyvslope = srbuyvolume.getSlope(); + sellvslope = srsellvolume.getSlope(); + + }catch(UnirestException ue){ + System.out.println("Exception thrown. Just continoue.."); + } + + return sinceid; + } + + private static int calculatePercentage(Double first, Double second){ + Double d = (1 - first / second) * 100; + + return Math.abs(d.intValue()); + } + + + private static void analyzeAverage(String shortname) throws UnirestException { + HttpResponse jsonResponse = Unirest.get("https://min-api.cryptocompare.com/data/histominute") + .queryString("fsym", shortname) + .queryString("tsym", "EUR" ) + .queryString("limit","10") + .queryString("aggregate","1") + .queryString("e","Kraken") + .asJson(); + + JSONArray dataArray = jsonResponse.getBody().getObject().getJSONArray("Data"); + + double priceAvg = dataArray.getJSONObject(0).getDouble("close"); + double tmpPrice = priceAvg; + int numRising = 0; + int numFalling = 0; + + for(int i = 1; i < dataArray.length(); i++){ + JSONObject obj = dataArray.getJSONObject(i); + tmpPrice = obj.getDouble("close"); + priceAvg += tmpPrice; + } + + Integer seconds = (jsonResponse.getBody().getObject().getInt("TimeTo")-jsonResponse.getBody().getObject().getInt("TimeFrom")) / 60; + priceAvg = priceAvg / dataArray.length(); + System.out.printf("Latest price: "+currentPrice+", calculated AVG from last "+seconds+ " minutes: %.2f€ ",priceAvg); + + if(Double.compare(currentPrice,priceAvg) > 0){ + buyindicator--; + }else{ + buyindicator++; + } + } + +} diff --git a/src/main/java/Order.java b/src/main/java/Order.java new file mode 100644 index 0000000..3d8351f --- /dev/null +++ b/src/main/java/Order.java @@ -0,0 +1,15 @@ +/** + * Created by dennis on 28.05.2017. + */ +public class Order { + public String pair; + public String type; + public String ordertype; + public Double price; + public Double volume; + public String leverage = "none"; + + public Order(){ + + } +} diff --git a/src/main/java/OrderHistory.java b/src/main/java/OrderHistory.java new file mode 100644 index 0000000..3641871 --- /dev/null +++ b/src/main/java/OrderHistory.java @@ -0,0 +1,25 @@ +import java.util.ArrayList; +import java.util.List; + +/** + * Created by dennis on 28.05.2017. + */ +public class OrderHistory { + public ArrayList orders = new ArrayList(); + + public OrderHistory(){ + + } + + public void addOrder(Order order){ + orders.add(order); + } + + public Order getLastOrder(){ + if(orders.size() > 0){ + return orders.get(orders.size()-1); + }else{ + return null; + } + } +} diff --git a/src/main/java/Trade.java b/src/main/java/Trade.java new file mode 100644 index 0000000..9ca98ac --- /dev/null +++ b/src/main/java/Trade.java @@ -0,0 +1,15 @@ +public class Trade { + public double price; + public double volume; + public int time; + public String buyorsell; + public String marketorlimit; + + public Trade(double price, double volume, int time, String buyorsell, String marketorlimit){ + this.price = price; + this.volume = volume; + this.time = time; + this.buyorsell = buyorsell; + this.marketorlimit = marketorlimit; + } +} diff --git a/src/main/java/TradeHistory.java b/src/main/java/TradeHistory.java new file mode 100644 index 0000000..f2f3e04 --- /dev/null +++ b/src/main/java/TradeHistory.java @@ -0,0 +1,77 @@ +import java.util.ArrayList; + +import org.json.JSONArray; + +public class TradeHistory { + public ArrayList trades = new ArrayList(); + public int numberOfBuyTrades = 0; + public int numberOfSellTrades = 0; + public double volumeOfBuyTrades = 0.0; + public double volumeOfSellTrades = 0.0; + public int timeframesec = 0; + public long sinceid = 0; + + public TradeHistory(JSONArray array, long sinceid){ + if(array.length() < 1) return; + + double price = 0.0; + double value = 0.0; + int timestamp = 0; + String buyorsell = ""; + String marketorlimit = ""; + + for(int i = 0;i < array.length();i++){ + price = array.getJSONArray(i).getDouble(0); + value = array.getJSONArray(i).getDouble(1); + timestamp = array.getJSONArray(i).getInt(2); + buyorsell = array.getJSONArray(i).getString(3); + marketorlimit = array.getJSONArray(i).getString(4); + + trades.add(new Trade(price,value,timestamp,buyorsell,marketorlimit)); + + if(buyorsell.equals("b")){ + this.numberOfBuyTrades++; + this.volumeOfBuyTrades += price; + }else if(buyorsell.equals("s")){ + this.numberOfSellTrades++; + this.volumeOfSellTrades += price; + } + } + + this.sinceid = sinceid; + this.timeframesec = array.getJSONArray(array.length()-1).getInt(2) - array.getJSONArray(0).getInt(2); + } + + public TradeHistory(){ + } + + public TradeHistory getNumberAndVolumeOfBuyTradesInPastSec(int timeframe){ + int currenttimestamp = (int) (System.currentTimeMillis() / 1000L); + TradeHistory returnHistory = new TradeHistory(); + + for(Trade trade : trades){ + if(trade.time > (currenttimestamp-timeframe)){ + returnHistory.trades.add(trade); + } + } + + returnHistory.calculateNumberAndVolume(); + + return returnHistory; + } + + public void calculateNumberAndVolume(){ + for(Trade trade : trades){ + if(trade.buyorsell.equals("b")){ + this.numberOfBuyTrades++; + this.volumeOfBuyTrades += trade.price; + }else if(trade.buyorsell.equals("s")){ + this.numberOfSellTrades++; + this.volumeOfSellTrades += trade.price; + } + } + + timeframesec = trades.get(trades.size()-1).time - trades.get(0).time; + } + +} diff --git a/src/main/resources/simpleRule.drl b/src/main/resources/simpleRule.drl new file mode 100644 index 0000000..0740015 --- /dev/null +++ b/src/main/resources/simpleRule.drl @@ -0,0 +1,8 @@ +import CryptoCoin; + +rule "accountBalanceAtLeast" + when + $account : Account( balance < 100 ) + then + System.out.println("Warning! money running out!"); +end \ No newline at end of file diff --git a/target/classes/CryptoCoin.class b/target/classes/CryptoCoin.class new file mode 100644 index 0000000000000000000000000000000000000000..593da4cfffdbf1a84b840c4647cf9e622eec7fe2 GIT binary patch literal 517 zcmZWl%TB^j5IsXnOG~wg?>DSOG!hrCFm52OP!||hZZ4&POG-;hYvO0QKob{!fFEU? z3nY-Zna4RZb7tn}_v;(LHOe*&>{!TR*Tx?9RditD(8LkJnhc^i3B|}K6k9{_Dr$iU z`?Yow%dlT3WXG}en4~7b_6E%PHxDu-7`HN%$sOUW^1p8dX+~)`@ayLtg5HRFJj!j! z(0@!vT|a&n%qiu_6G2DBQsoO!PX=;Aa9WM{ZJb1nNQS)6>XM7myjVL*W6!^rYM8sM zzfuP|aB%FvM9##CgHx0oSg^TkSx6`>Z-43zeJ>$s6}9vVG1nvHd$XH5B1l<}%bFEPf+z@icIzL1KJe&JEIx6ii6J9U~BTM e95&b%7%9y=IWKai>XahQA`6?`P1xcrgY7>b+-N-j literal 0 HcmV?d00001 diff --git a/target/classes/Funds.class b/target/classes/Funds.class new file mode 100644 index 0000000000000000000000000000000000000000..e1bbd45a36ea8ca1c66c55d9a7007e48c269b476 GIT binary patch literal 2090 zcma)7T~`}b6x}xonS2aQNFlYYt%;TzpcGrJ))J{gz+wYv)26h34#^OPhDp|B!m>Zb zU*Myu^P7Fb{$jT#^|p_&ukiY zW1-?YmfctkcuKAAPSadmB1W`m*_OK`5H8GA1tKf0I?+;P%QiQ=2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Au4Admw{@hIcy;Gdc_Jn4zYu940u+-2>+WG z{&%o)z(_-CKg{FNUPR4wh$nz5p;mg3Pr_UeO8ooS4@##yP|jCyCHQ5FZim}3U?5*N z={zx)`VT9_5QUFYW@qscIx<8n^5m*KiEuNF!s^i>dh9421@*ZhYC1}fgL-0!W|a>i zs>2`gx4#HV#(N3g_4sSXUn~AD6m2_cYZZ+LT@Lh(hf7YtN!t&(E8voqIMhtWQDF*g gps6^-OoMdOsRK^C0~Nt}s2q2}c^Pg8AK=OV1-jV3c>n+a literal 0 HcmV?d00001 diff --git a/target/classes/Order.class b/target/classes/Order.class new file mode 100644 index 0000000000000000000000000000000000000000..4280f887ed3a846d60fb0d1c3428177c3f4fbed9 GIT binary patch literal 418 zcmYjNyH3ME5S(-DIB`r8!u!$CK?)*j9u0^pB1KU8vvUd;IlkzyE%8|t2#JCZ;G+;@ zV+nN9?#}G&>%P7}J^@_dIDm(}7WUh4ap2?7$B}@$mf8vo#!FeqQ6kgDXqs7_E-snN zUe-#WZR}jx-`HDQ9h3X7zcYE1DC(PqN%9r5twa^d$_2ybl}>ebBhWZKo3Z7snUn2} zb*dinRix~rWO3Qh#4?#lt4myyZuX>~1^n@(+<+5;smX1u?sZubRP1@Vc!(}~?4Fub zh1h^E;8j_H{@-DfXsO~1C%oU|mo&lk;4|XJwQtuxK&Rrv+OuVaMLCH2KG8KCMnGry l4lx`!Z)m&{I@qM`qCp#SRKVB8phA@#Ti7NN*r9c>`vbS2Oy~dr literal 0 HcmV?d00001 diff --git a/target/classes/OrderHistory.class b/target/classes/OrderHistory.class new file mode 100644 index 0000000000000000000000000000000000000000..39dc9dc4a6989d85dfe2d8bc25d6a7723d122f01 GIT binary patch literal 773 zcmZvaZEF)j6ot=hw%P1DwrSHBUt{X)ZmI@9rxa8W3yTFS75z5JE^$iC!e%4XALDPR zpeZPbpZ!tdnaz+CEPKCV48*yhyVf9~eY;kK*dC z9_eCFpb|z$0`BuH;n+&7N9n7{$6lJhQN1B=*5a(MhDR#brni@F@j)}l@{ISA_E~;H zXiX(aX(14V*38hC%IE@~y%Ugww20NXuxdYy=8uBIY?AlW7uwjbmICYW*!*sZ71RY9 z7wkad5~Rcfgc1?j5<7TEbL%0`qXgmu zlyPP?@xbN1nc10nZ}#i^;}gIY&Mjn6%fiGF!!g4NL!IH&M8iZ=z<5@2;tPnLKzb7f z>jfpLNHU4OK-OEoglgpnfk0_6cQa=z85MQ2ama!JGRNx+B?YkI|&B z%FuTjpr3$6k>EX=X_aQ$rkNIM7Nl9CzCFrbk<{}|=N-bih>>vGF_KQjh>>!t=@^Dn zHDjdTs5yZ$VVxvFLn#tu$vg>`$#;$98kAM&wTm=i6Z<$I=7>9mj@VvOM{Lm05nKG7 NV3Q_w9#TDl>JOZ&T(JNE literal 0 HcmV?d00001 diff --git a/target/classes/TradeHistory.class b/target/classes/TradeHistory.class new file mode 100644 index 0000000000000000000000000000000000000000..add998d514cbdc24adf5d82d81115230cacf6bc4 GIT binary patch literal 2645 zcmb7GNpMtE6g@vZcmE`G21p2FfD9dyfMAp)pdn#M>~zqMi9rN@x<8#CdVt@*13|?B zRGeYS$|?#gF2xFs3T3%w;lh$CSFUB{#!crA5R*vwkqkn|DG%fEpf)IybI&89axDlU5V(KwtfWF~cU z0n zN%uo6qSwe8);YUE!vYkWmk(gab&rs`_0(XBd$r37~Mplp6S&nLxX|7a7 za|tayrkRG!okhjq32Vw={uQPA4ik=?Im;qFn!ux==4r9Gea18r^y`_?(gltI$vkgq znKRTU3$r;hPY@)o4R~71raI%6X=GFMU7pd*(>epCjf`O_aJ5M8O)1?f<=mG|jy;Lm zVD^ZXx8edzxMi?)MY?u}37OL;CnFn61*;MT)6}!pvLwq*o$by#1rt=llPIJ$%fW3i z2L-`+u3#qggN6VZwj1jl>yYA9>_WeS>ZdSEMH8A;M9`*UyNGslsOS{2L#8|Nj1PGg z777ZWVg~0_oX4z+3wTq-TX>rY+W{rWMHTPhU6Ntahxb&xZ|ivs7XGk%bD@NOM*mlR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