scripts/max: show amount

This commit is contained in:
c9s 2020-12-02 16:56:04 +08:00
parent c0b21fd392
commit cd34c2f4e7

View File

@ -80,6 +80,7 @@ case "$command" in
market=$1
declare -A trades_params=()
trades_params[market]=$market
myTrades trades_params | jq -r '.[] | "\(.id) \(.market) \(.side) \(.price) \t \(.volume) \t fee = \( .fee | tonumber * 100000 | floor / 100000 ) \(.fee_currency)\t\( .created_at | strflocaltime("%Y-%m-%dT%H:%M:%S %Z") )"'
myTrades trades_params | \
jq -r '.[] | "\(.id) \(.market) \(.side) \(.price) \t \(.volume) amount = \((.price | tonumber) * (.volume | tonumber) * 100 | floor / 100) \t fee = \( .fee | tonumber * 100000 | floor / 100000 ) \(.fee_currency)\t\( .created_at | strflocaltime("%Y-%m-%dT%H:%M:%S %Z") )"'
;;
esac