From 7680e1fca848fbc59ba12c4bc93ef3a1237fa4a0 Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 24 Sep 2024 17:15:35 +0200 Subject: [PATCH] refresh orders --- dabo/functions/order.sh | 3 ++- dabo/functions/order_cancel.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dabo/functions/order.sh b/dabo/functions/order.sh index 34a7794..71dc94d 100644 --- a/dabo/functions/order.sh +++ b/dabo/functions/order.sh @@ -116,7 +116,8 @@ function order { echo "$f_order" | notify.sh -s "ORDER" f_ccxt "print($STOCK_EXCHANGE.createOrder(${f_order}))" || return 1 - # refresh positions + # refresh orders and positions + get_orders "$f_symbol" get_positions } diff --git a/dabo/functions/order_cancel.sh b/dabo/functions/order_cancel.sh index db05f1f..7f0665e 100644 --- a/dabo/functions/order_cancel.sh +++ b/dabo/functions/order_cancel.sh @@ -35,6 +35,8 @@ function order_close { if [ "$f_symbol" = "$f_order_symbol" ] then f_ccxt "print(${STOCK_EXCHANGE}.cancelAllOrders('$f_symbol'))" + get_orders "$f_symbol" fi done + }