From 1eee0c91bf931c29b5a1f5388793c1a06ee49080 Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 30 Sep 2017 20:59:54 +0200 Subject: [PATCH 1/7] adapt README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3dc649d06..9d4c457d8 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,8 @@ $ cp config.json.example config.json $ python -m venv .env $ source .env/bin/activate $ pip install -r requirements.txt -$ ./main.py +$ pip install -e . +$ ./freqtrade/main.py ``` There is also an [article](https://www.sales4k.com/blockchain/high-frequency-trading-bot-tutorial/) about how to setup the bot (thanks [@gurghet](https://github.com/gurghet)). @@ -73,7 +74,7 @@ There is also an [article](https://www.sales4k.com/blockchain/high-frequency-tra #### Execute tests ``` -$ python -m unittest +$ python setup.py test ``` #### Docker From 805733350164f6dc98e9c554056ff82ec892131d Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 30 Sep 2017 21:00:14 +0200 Subject: [PATCH 2/7] adapt Dockerfile for new project structure --- Dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index f03d75e4d..bd303769d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,20 @@ FROM python:3.6.2 -RUN pip install numpy RUN apt-get update -RUN apt-get -y install build-essential +RUN apt-get -y install build-essential + +# Install TA-lib RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz RUN tar zxvf ta-lib-0.4.0-src.tar.gz RUN cd ta-lib && ./configure && make && make install ENV LD_LIBRARY_PATH /usr/local/lib -RUN mkdir -p /freqtrade +# Prepare environment +RUN mkdir /freqtrade +COPY . /freqtrade/ WORKDIR /freqtrade -ADD ./requirements.txt /freqtrade/requirements.txt -RUN pip install -r requirements.txt -ADD . /freqtrade -CMD python main.py +# Install dependencies and execute +RUN pip install -r requirements.txt +RUN pip install -e . +CMD ["freqtrade"] From a4a1f7961a69349c49e48fa64672a13edf91878f Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 30 Sep 2017 21:00:42 +0200 Subject: [PATCH 3/7] set executable bit --- bin/freqtrade | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bin/freqtrade diff --git a/bin/freqtrade b/bin/freqtrade old mode 100644 new mode 100755 From 3456ead83906859054904de90a76a2eb7b29224b Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 30 Sep 2017 21:00:53 +0200 Subject: [PATCH 4/7] add numpy as required dep --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index c6a1e399b..7ceb3b850 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ pandas==0.20.3 scikit-learn==0.19.0 scipy==0.19.1 jsonschema==2.6.0 +numpy==1.13.3 TA-Lib==0.4.10 # Required for plotting data From e42edd9de7b8ac33d28d721dad126a386a939310 Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 30 Sep 2017 21:01:23 +0200 Subject: [PATCH 5/7] add required folders to MANIFEST --- MANIFEST.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index c41afdcf9..b018ee274 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,6 @@ include LICENSE include README.md -include config.json.example \ No newline at end of file +include config.json.example +include freqtrade/rpc/*.py +include freqtrade/tests/*.py +include freqtrade/tests/testdata/*.json \ No newline at end of file From e14cc2e4f6d6d9ca31f95018bc1a4cfb220f0849 Mon Sep 17 00:00:00 2001 From: gcarq Date: Sun, 1 Oct 2017 14:06:18 +0200 Subject: [PATCH 6/7] add setup.cfg to force pytest --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..6a53971b3 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +[aliases] +test=pytest + From 378b5a3b14ff2a13fc996e1f20245195efcb0812 Mon Sep 17 00:00:00 2001 From: gcarq Date: Sun, 1 Oct 2017 14:07:09 +0200 Subject: [PATCH 7/7] fix indentation --- config.json.example | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config.json.example b/config.json.example index 584fb019d..c2f6668d4 100644 --- a/config.json.example +++ b/config.json.example @@ -3,14 +3,14 @@ "stake_currency": "BTC", "stake_amount": 0.05, "dry_run": false, - "minimal_roi": { - "60": 0.0, - "40": 0.01, - "20": 0.02, - "0": 0.03 - }, - "stoploss": -0.40, - "bid_strategy": { + "minimal_roi": { + "60": 0.0, + "40": 0.01, + "20": 0.02, + "0": 0.03 + }, + "stoploss": -0.40, + "bid_strategy": { "ask_last_balance": 0.0 }, "bittrex": {