Skip to content

Commit

Permalink
Cloned from staff repos
Browse files Browse the repository at this point in the history
This is a more developed version cloned from staff's repo.
  • Loading branch information
geeksloth committed Oct 11, 2024
1 parent 2228e4b commit 1c48996
Show file tree
Hide file tree
Showing 12 changed files with 2,513 additions and 913 deletions.
Binary file added .DS_Store
Binary file not shown.
45 changes: 23 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y \
python3 \
python3-pip
FROM python:3.9.18
ENV PYTHON_TA_LIB_PACKAGE_NAME "TA-lib"
ENV PYTHON_TA_LIB_VERSION "0.4.28"

RUN apt-get -y update
RUN python3 -m pip install --upgrade pip
WORKDIR /bot
COPY ta-lib-0.4.0-src.tar.gz /bot/
RUN tar -xzf ta-lib-0.4.0-src.tar.gz
WORKDIR /bot/ta-lib
RUN ./configure
RUN make
RUN make install
RUN python3 -m pip install \
ta-lib
RUN python3 -m pip install \
colorama
WORKDIR /bot
RUN python3 -m pip install \
requests
RUN python3 -m pip install \
binance-futures-connector
RUN apt-get install -y iputils-ping
RUN pip3 install numpy
RUN pip3 install requests
RUN pip3 install setuptools
RUN cd /tmp
RUN curl -L -O http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz \
&& tar -xzf ta-lib-0.4.0-src.tar.gz \
&& cd ta-lib/ \
&& sed -i 's/^#define TA_IS_ZERO(v).*$/#define TA_IS_ZERO(v) (((-0.000000000000000001)<v)\&\&(v<0.000000000000000001))/' src/ta_func/ta_utility.h \
&& sed -i 's/^#define TA_IS_ZERO_OR_NEG(v).*$/#define TA_IS_ZERO_OR_NEG(v) (v<0.000000000000000001)/' src/ta_func/ta_utility.h \
&& ./configure --prefix=/usr \
&& make \
&& make install \
&& pip3 install ${PYTHON_TA_LIB_PACKAGE_NAME}==${PYTHON_TA_LIB_VERSION}
WORKDIR /app/binancesloth
RUN pip3 install python-binance
RUN pip3 install binance-future
RUN pip3 install binance-futures-connector
RUN pip3 install tabulate
35 changes: 0 additions & 35 deletions config-dist.json

This file was deleted.

66 changes: 66 additions & 0 deletions config/config.dist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"disclaimer":"This JSON file support BinanceSloth version 1.0 and above.",
"customWD":{
"enable":false,
"linux":"/home/pi/Bots",
"windows":"C:\\Playground\\official\\jakt-bot"
},
"BinanceAPI":{
"name":"",
"apiName": "",
"key":"",
"secret":"",
"base_url":"https://fapi.binance.com/api/v3/"
},
"LINE":{
"enable":false,
"enableErrorNotify":true,
"token":"",
"api":"https://notify-api.line.me/api/notify"
},
"static":{
"colors":[
"LIGHTBLACK_EX",
"LIGHTBLUE_EX",
"LIGHTCYAN_EX",
"LIGHTGREEN_EX",
"LIGHTMAGENTA_EX",
"LIGHTRED_EX",
"LIGHTWHITE_EX",
"LIGHTYELLOW_EX"
]
},
"reporter":{
"interval":900
},
"loggingLevel":"INFO",
"timezone":"Asia/Bangkok",
"pairs":[
{
"enable":true,
"crypto":"SOL",
"asset":"USDT",
"strategy":"K90_v1",
"used_asset_percent":25,
"interval_when_opened":3600,
"interval_when_closed":3600,
"priority":1,
"lineAlert":0,
"color":"LIGHTMAGENTA_EX",
"testOrder":false
},
{
"enable":false,
"crypto":"BTC",
"asset":"USDT",
"strategy":"K90_v1",
"used_asset_percent":50,
"interval_when_opened":300,
"interval_when_closed":600,
"priority":1,
"lineAlert":0,
"color":"LIGHTGREEN_EX",
"testOrder":true
}
]
}
15 changes: 10 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
version: '3'
version: '3.2'
services:
bot:
binancesloth:
build:
dockerfile: "Dockerfile"
context: .
container_name: "binancesloth"
volumes:
- .:/bot
working_dir: /bot
command: ["python3", "jakt_v0.18.1.py"]
- type: bind
source: ./
target: /app/binancesloth
working_dir: /app/binancesloth
stdin_open: true # docker run -i
tty: true # docker run -t
command: ["python3", "main-v0.28.1.py", "-c", "/app/binancesloth/config/config.json"]
Loading

0 comments on commit 1c48996

Please # to comment.