docker-non-root, bitpanda trading, home for .ssh for ssh-to-signal messages

This commit is contained in:
olli 2023-05-07 13:18:31 +02:00
parent 73541fd903
commit 1173980f3e
4 changed files with 33 additions and 0 deletions

2
.gitignore vendored
View File

@ -1,5 +1,7 @@
docker-compose.override.yml docker-compose.override.yml
data/botdata data/botdata
data/index.html data/index.html
data/index.html.tmp
dabo/.binance-secrets dabo/.binance-secrets
dabo/.bitpanda-secrets dabo/.bitpanda-secrets
home/.ssh/

View File

@ -0,0 +1,27 @@
#!/bin/bash
function bitpanda-api-call {
g_echo_note "RUNNING FUNCTION ${FUNCNAME} $@"
local method=$1
local call=$2
local params=$3
if [ -s /dabo/.bitpanda-secrets ]
then
. /dabo/.bitpanda-secrets
else
g_echo_error "No secrets file found"
return 1
fi
echo "${call}" | egrep -q "/account/" && local f_token="-H 'Authorization: Bearer ${API_TOKEN}'"
echo "curl -s -X ${method} --url https://api.exchange.bitpanda.com/${call} $f_token -H 'Accept: application/json'" >${g_tmp}/API_CMD
echo "curl -s -X ${method} --url https://api.exchange.bitpanda.com/${call} -H 'Accept: application/json'" >${g_tmp}/API_CMD_WO_KEY
g_runcmd g_retrycmd sh ${g_tmp}/API_CMD >${g_tmp}/API_CMD_OUT 2>&1
if egrep -q -i '^{"code":|error' ${g_tmp}/API_CMD_OUT
then
g_echo_error "$(cat ${g_tmp}/API_CMD_WO_KEY): $(cat ${g_tmp}/API_CMD_OUT)"
return 1
fi
}

3
home/.bash_history Normal file
View File

@ -0,0 +1,3 @@
id
ps ax
ps aux

1
home/.dabo-bot.sh.lock Normal file
View File

@ -0,0 +1 @@
1