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"] 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 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 diff --git a/bin/freqtrade b/bin/freqtrade old mode 100644 new mode 100755 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": { diff --git a/requirements.txt b/requirements.txt index 0d360c10b..b070fe0ed 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 pytest==3.2.2 pytest-mock==1.6.3 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 +