Change function
This commit is contained in:
parent
229a4c38ae
commit
e68804aaf7
|
|
@ -145,7 +145,6 @@ pub async fn limit_order_entry(
|
|||
unsafe {
|
||||
if RUNNING_MODE == SIMUL {
|
||||
let mut update_values = vec![
|
||||
(String::from("order_type"), entry_coin_info.order_type.clone()),
|
||||
(String::from("status"), String::from("SIMUL")),
|
||||
(String::from("transact_time"), server_epoch.to_string()),
|
||||
(String::from("close_time"), entry_coin_info.close_time.to_string()),
|
||||
|
|
@ -155,11 +154,9 @@ pub async fn limit_order_entry(
|
|||
(String::from("base_qty_ordered"), order_quantity.to_string()),
|
||||
(String::from("base_qty_fee_adjusted"), simul_base_qty_fee_adjusted.to_string())
|
||||
];
|
||||
|
||||
update_values.push((String::from("position"), entry_coin_info.position.clone()));
|
||||
|
||||
let update_condition = vec![(String::from("id"), entry_coin_info.id.to_string())];
|
||||
update_record3(&update_table_name, &update_values, &update_condition)
|
||||
update_record2(&update_table_name, &update_values, &update_condition)
|
||||
.await?;
|
||||
|
||||
sub_future_available_usdt(used_usdt).await;
|
||||
|
|
@ -272,7 +269,7 @@ pub async fn limit_order_entry(
|
|||
sub_future_available_usdt(cummulative_quote_qty).await;
|
||||
|
||||
let update_condition = vec![(String::from("id"), entry_coin_info.id.to_string())];
|
||||
update_record3(&update_table_name, &update_values, &update_condition)
|
||||
update_record2(&update_table_name, &update_values, &update_condition)
|
||||
.await?;
|
||||
}
|
||||
},
|
||||
|
|
@ -432,7 +429,7 @@ pub async fn cancel_open_positioning_order(
|
|||
(String::from("order_id"), order.order_id.to_string()),
|
||||
(String::from("symbol"), order.symbol.clone()),
|
||||
];
|
||||
update_record3(&table_name, &update_values, &update_condition)
|
||||
update_record2(&table_name, &update_values, &update_condition)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
|
@ -546,7 +543,7 @@ pub async fn query_open_positioning_order(
|
|||
(String::from("order_id"), order.order_id.to_string()),
|
||||
(String::from("symbol"), order.symbol.clone()),
|
||||
];
|
||||
update_record3(&table_name, &update_values, &update_condition)
|
||||
update_record2(&table_name, &update_values, &update_condition)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
|
@ -573,7 +570,7 @@ pub async fn query_open_positioning_order(
|
|||
(String::from("order_id"), order.order_id.to_string()),
|
||||
(String::from("symbol"), order.symbol.clone()),
|
||||
];
|
||||
update_record3(&update_table_name, &update_values, &update_condition)
|
||||
update_record2(&update_table_name, &update_values, &update_condition)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
|
@ -960,7 +957,7 @@ pub async fn sub_future_available_usdt(sub_usdt: Decimal) {
|
|||
|
||||
let update_values = vec![(String::from("available_usdt"), value_build)];
|
||||
let update_condition = vec![(String::from("id"), String::from("1"))];
|
||||
update_record3(&update_table_name, &update_values, &update_condition)
|
||||
update_record2(&update_table_name, &update_values, &update_condition)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user