Delete unnecessary check
This commit is contained in:
parent
3dd3dfc344
commit
6ef75f20e1
|
|
@ -121,13 +121,11 @@ pub async fn buy_coin(
|
||||||
// check conditions for buying
|
// check conditions for buying
|
||||||
set_is_tradable().await;
|
set_is_tradable().await;
|
||||||
let mut is_tradable = check_is_tradable().await;
|
let mut is_tradable = check_is_tradable().await;
|
||||||
let suggested_coin_list_table_name = String::from("suggested_coin_list");
|
|
||||||
let mut suggested_coin = select_suggested_coin().await;
|
let mut suggested_coin = select_suggested_coin().await;
|
||||||
let mut delete_condition = String::from("WHERE ");
|
let mut delete_condition = String::from("WHERE ");
|
||||||
let mut is_exist_delete_symbol: bool = false;
|
let mut is_exist_delete_symbol: bool = false;
|
||||||
let marketcap_vec = select_marketcap().await;
|
|
||||||
|
|
||||||
if is_tradable == true && !suggested_coin.is_empty() && !marketcap_vec.is_empty() {
|
if is_tradable == true && !suggested_coin.is_empty() {
|
||||||
// && (signal_decision.first().unwrap().decision == "KEEP" || signal_decision.first().unwrap().decision == "UP") {
|
// && (signal_decision.first().unwrap().decision == "KEEP" || signal_decision.first().unwrap().decision == "UP") {
|
||||||
let unit_trade_usdt = fetch_unit_trade_usdt().await;
|
let unit_trade_usdt = fetch_unit_trade_usdt().await;
|
||||||
|
|
||||||
|
|
@ -357,6 +355,7 @@ pub async fn buy_coin(
|
||||||
delete_condition.pop();
|
delete_condition.pop();
|
||||||
delete_condition.pop();
|
delete_condition.pop();
|
||||||
delete_condition.push(';');
|
delete_condition.push(';');
|
||||||
|
let suggested_coin_list_table_name = String::from("suggested_coin_list");
|
||||||
delete_record(&suggested_coin_list_table_name, &delete_condition)
|
delete_record(&suggested_coin_list_table_name, &delete_condition)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
@ -388,6 +387,7 @@ pub async fn buy_coin(
|
||||||
delete_condition.pop();
|
delete_condition.pop();
|
||||||
delete_condition.pop();
|
delete_condition.pop();
|
||||||
delete_condition.push(';');
|
delete_condition.push(';');
|
||||||
|
let suggested_coin_list_table_name = String::from("suggested_coin_list");
|
||||||
delete_record(&suggested_coin_list_table_name, &delete_condition)
|
delete_record(&suggested_coin_list_table_name, &delete_condition)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
@ -1128,17 +1128,8 @@ pub async fn select_marketcap() -> Vec<MarketCapIndex> {
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
select_result
|
select_result
|
||||||
// let result_vec = select_result.first().unwrap();
|
|
||||||
// market_cap_list.market_cap_index = result_vec.market_cap_index;
|
|
||||||
// market_cap_list.minimum = result_vec.minimum;
|
|
||||||
// market_cap_list.maximum = result_vec.maximum;
|
|
||||||
// market_cap_list.transition_point = result_vec.transition_point;
|
|
||||||
// market_cap_list.liquidation_signal = result_vec.liquidation_signal;
|
|
||||||
// market_cap_list.negative_buy_signal = result_vec.negative_buy_signal;
|
|
||||||
// market_cap_list.transition_buy_signal = result_vec.transition_buy_signal;
|
|
||||||
|
|
||||||
// market_cap_list
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn select_scoreboard() -> Vec<ScoreboardList> {
|
pub async fn select_scoreboard() -> Vec<ScoreboardList> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user