update
This commit is contained in:
parent
c68ee8bac2
commit
87849d9c27
8
.gitignore
vendored
8
.gitignore
vendored
@ -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
|
||||
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -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
|
||||
1
bn.py
1
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
|
||||
|
||||
6
requirements.txt
Normal file
6
requirements.txt
Normal file
@ -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
|
||||
@ -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('多头排列信号出现!')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user