Fix expire time and buy price expression
This commit is contained in:
parent
72aaa3bf60
commit
a44901f537
|
|
@ -343,7 +343,7 @@ pub async fn limit_order_buy(
|
|||
.unwrap()
|
||||
.base_asset_precision;
|
||||
let buy_price = decimal_div(cummulative_quote_qty, base_qty_ordered)
|
||||
.round_dp_with_strategy(base_asset_precision, RoundingStrategy::ToZero);
|
||||
.round_dp_with_strategy(8, RoundingStrategy::ToZero);
|
||||
|
||||
insert_value_container.push(cummulative_quote_qty.to_string()); // used_usdt
|
||||
insert_value_container.push(0.0.to_string()); // expected_get_usdt
|
||||
|
|
@ -564,7 +564,7 @@ pub async fn monitoring_filled_buy_order(
|
|||
target_profit_percent(0.2)
|
||||
);
|
||||
is_sell = true;
|
||||
} else if server_epoch - element.close_time > (1_800) * 10 // 30min * 10
|
||||
} else if server_epoch - element.close_time > (1_800_000) * 10 // 30min * 10
|
||||
{
|
||||
println!(
|
||||
"selling {} due to time up {:.3}",
|
||||
|
|
@ -1240,7 +1240,7 @@ pub async fn cancel_buy_order(
|
|||
.unwrap()
|
||||
.base_asset_precision;
|
||||
let buy_price = decimal_div(cummulative_quote_qty, base_qty_ordered)
|
||||
.round_dp_with_strategy(base_asset_precision, RoundingStrategy::ToZero);
|
||||
.round_dp_with_strategy(8, RoundingStrategy::ToZero);
|
||||
|
||||
let update_values = vec![
|
||||
(String::from("status"), status_value_build), // status
|
||||
|
|
@ -1719,7 +1719,7 @@ pub async fn query_buy_order(
|
|||
.unwrap()
|
||||
.base_asset_precision;
|
||||
let buy_price = decimal_div(cummulative_quote_qty, base_qty_ordered)
|
||||
.round_dp_with_strategy(base_asset_precision, RoundingStrategy::ToZero);
|
||||
.round_dp_with_strategy(8, RoundingStrategy::ToZero);
|
||||
|
||||
let update_values = vec![
|
||||
(String::from("status"), value_build), // status
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user