15 lines
342 B
Bash
15 lines
342 B
Bash
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
|
|
|
|
|
|
|
|
|
|
}
|
|
|