From b75ebf2f0f1c87bc341123305ee5addfe4198784 Mon Sep 17 00:00:00 2001 From: c9s Date: Thu, 3 Dec 2020 09:25:26 +0800 Subject: [PATCH] scripts/max: support showing open stop orders --- scripts/max.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/max.sh b/scripts/max.sh index 3168aae14..7de07103f 100644 --- a/scripts/max.sh +++ b/scripts/max.sh @@ -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)