dabo/functions/api-calls.sh

15 lines
342 B
Bash
Raw Normal View History

2023-04-28 17:09:15 +02:00
function EXCHANGE_GET_ASSETS_CMD {
if [ ${STOCK_EXCHANGE} = "BINANCE" ]
then
binance-api-call GET /api/v3/ticker/price || return 1
# parse API output
cat ${g_tmp}/API_CMD_OUT | jq -r '.[] | .symbol + "," + .price' | grep "${CURRENCY}," | egrep -v "${TRANSFER_CURRENCY},|,0[\.][0]*$" | sort >${f_filename}_OUT.tmp
fi
}