scripts/max: support showing open stop orders

This commit is contained in:
c9s 2020-12-03 09:25:26 +08:00
parent 17590fcc08
commit b75ebf2f0f

View File

@ -58,7 +58,8 @@ case "$command" in
market=$1
declare -A orders_params=()
orders_params[market]=$market
myOrders orders_params | jq -r '.[] | "\(.id) \(.market) \(.ord_type) \(.side) \(.price) \t \(.volume) \(.state)"'
myOrders orders_params | \
jq -r '.[] | "\(.id) \(.market) \(.side) \(.ord_type) \(if .ord_type | test("stop") then "stop@" + .stop_price else "" end) price = \(if .ord_type | test("market") then "any" else .price end) \t volume = \(.volume) \(.state)"'
;;
cancel)