Compare commits
2 Commits
d39efaa7ae
...
55c6303f0f
Author | SHA1 | Date | |
---|---|---|---|
55c6303f0f | |||
5e9e5d6c05 |
@ -2,7 +2,8 @@ FROM debian:latest
|
||||
RUN apt-get update && \
|
||||
apt-get -y install curl && \
|
||||
curl https://gitea.ds9.dedyn.io/olli/debian.ansible.docker/raw/branch/main/build-debian-env.sh >build-debian-env.sh && \
|
||||
bash -ex build-debian-env.sh
|
||||
bash -ex build-debian-env.sh && \
|
||||
git clone https://github.com/ccxt/ccxt.git --depth 1
|
||||
RUN addgroup --system --gid 10000 dabo
|
||||
RUN adduser --system --disabled-password --disabled-login --gid 10000 --uid 10000 --home /dabo/home dabo
|
||||
ENV LANG en_US.utf8
|
||||
|
23
dabo/functions/ccxt.sh
Normal file
23
dabo/functions/ccxt.sh
Normal file
@ -0,0 +1,23 @@
|
||||
function f_ccxt {
|
||||
|
||||
if [ -s /dabo/.${STOCK_EXCHANGE}-secrets ]
|
||||
then
|
||||
. /dabo/.${STOCK_EXCHANGE}-secrets
|
||||
else
|
||||
g_echo_error "No secrets found (/dabo/.${STOCK_EXCHANGE}-secrets) found"
|
||||
return 1
|
||||
fi
|
||||
|
||||
g_python 'import os' || return 1
|
||||
g_python 'import sys' || return 1
|
||||
|
||||
g_python 'sys.path.append("/ccxt/python")' || return 1
|
||||
|
||||
g_python 'import ccxt' || return 1
|
||||
|
||||
g_python "exchange = ccxt.${STOCK_EXCHANGE}({'apiKey': '${API_KEY}','secret': '${API_SECRET}','options': {'defaultType': 'swap',},})" || return 1
|
||||
|
||||
g_python_wantoutput=1
|
||||
g_python 'print(exchange.fetch_balance ({"currency": "USDT"}))' || return 1
|
||||
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
version: '3.6'
|
||||
services:
|
||||
|
||||
dabo-bot:
|
||||
|
Loading…
Reference in New Issue
Block a user