From 87849d9c27fe7b80a58c8aada36642c877532f2a Mon Sep 17 00:00:00 2001 From: aazhou Date: Thu, 8 Jun 2023 16:06:20 +0800 Subject: [PATCH] update --- .gitignore | 8 +------- Dockerfile | 7 +++++++ bn.py | 1 - requirements.txt | 6 ++++++ strategy/crossover.py | 1 - 5 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 Dockerfile create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index d403580..5e79d70 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ parts/ sdist/ var/ wheels/ +pip-wheel-metadata/ share/python-wheels/ *.egg-info/ .installed.cfg @@ -49,7 +50,6 @@ coverage.xml *.py,cover .hypothesis/ .pytest_cache/ -cover/ # Translations *.mo @@ -72,7 +72,6 @@ instance/ docs/_build/ # PyBuilder -.pybuilder/ target/ # Jupyter Notebook @@ -133,8 +132,3 @@ dmypy.json # pytype static type analyzer .pytype/ - -# Cython debug symbols -cython_debug/ - -# End of https://mrkandreev.name/snippets/gitignore-generator/#Python \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..78c6a69 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.8-slim +ENV PYTHONIOENCODING=utf-8 +ENV TIME_ZONE Asia/Shanghai +RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt +WORKDIR /opt/ +COPY ["./", "/opt/"] +CMD python3 -u main.py \ No newline at end of file diff --git a/bn.py b/bn.py index 8a93e6b..926196e 100644 --- a/bn.py +++ b/bn.py @@ -6,7 +6,6 @@ client = Spot() # Get klines def klines(symbol, interval): lines = client.klines(symbol,interval) - print(len(lines)) return lines # Get Symbols diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..b220a22 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +binance==0.3 +binance_connector==3.1.0 +numpy==1.23.4 +requests==2.28.1 +schedule==1.1.0 +TA_Lib==0.4.26 diff --git a/strategy/crossover.py b/strategy/crossover.py index 2423447..9676fd9 100644 --- a/strategy/crossover.py +++ b/strategy/crossover.py @@ -42,7 +42,6 @@ def check_bearish_crossover(data): def strategy_run(symbol, interval): # 获取kline数据 data = bn.klines(symbol, interval) - print(f'获取Kline数据: [{symbol}] - [{interval}]') if check_bullish_crossover(data): print('多头排列信号出现!')