From 2d50f9cdbb08e04e8d129b6a6e4afbc807581b44 Mon Sep 17 00:00:00 2001 From: Sik Yoon Date: Tue, 21 May 2024 12:47:28 +0900 Subject: [PATCH] Fix wrong column name --- src/future/order.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/future/order.rs b/src/future/order.rs index 19b1236..3fca8d8 100644 --- a/src/future/order.rs +++ b/src/future/order.rs @@ -379,13 +379,13 @@ pub async fn cancel_open_positioning_order( ) .unwrap(); - let buy_price = decimal_div(cummulative_quote_qty, base_qty_ordered) + let entry_price = decimal_div(cummulative_quote_qty, base_qty_ordered) .round_dp_with_strategy(8, RoundingStrategy::ToZero); let update_values = vec![ (String::from("status"), String::from("FILLED")), // status (String::from("used_usdt"), cummulative_quote_qty.to_string()), // used_usdt - (String::from("buy_price"), buy_price.to_string()), // buy_price + (String::from("entry_price"), entry_price.to_string()), // entry_price (String::from("base_qty_ordered"),base_qty_ordered.to_string()), // base_qty_ordered ]; let update_condition = vec![ @@ -484,13 +484,13 @@ pub async fn query_open_positioning_order( ) .unwrap(); - let buy_price = decimal_div(cummulative_quote_qty, base_qty_ordered) + let entry_price = decimal_div(cummulative_quote_qty, base_qty_ordered) .round_dp_with_strategy(8, RoundingStrategy::ToZero); let update_values = vec![ (String::from("status"), value_build), // status (String::from("used_usdt"), cummulative_quote_qty.to_string()), // used_usdt - (String::from("buy_price"), buy_price.to_string()), // buy_price + (String::from("entry_price"), entry_price.to_string()), // entry_price (String::from("base_qty_ordered"), base_qty_ordered.to_string()), // base_qty_ordered ]; let update_condition = vec![