|
|
@@ -438,7 +438,15 @@ pub async fn generate_fot(query_value: Value) -> HttpResponse {
|
|
|
return response
|
|
|
}
|
|
|
};
|
|
|
- let minute_time_range = match parse_str_to_decimal(query_value.clone(), "minute_time_range") {
|
|
|
+ let start_time = match parse_str_to_decimal(query_value.clone(), "start_time") {
|
|
|
+ Ok(t) => {
|
|
|
+ t.to_i64().unwrap()
|
|
|
+ }
|
|
|
+ Err(response) => {
|
|
|
+ return response
|
|
|
+ }
|
|
|
+ };
|
|
|
+ let end_time = match parse_str_to_decimal(query_value.clone(), "end_time") {
|
|
|
Ok(t) => {
|
|
|
t.to_i64().unwrap()
|
|
|
}
|
|
|
@@ -454,9 +462,7 @@ pub async fn generate_fot(query_value: Value) -> HttpResponse {
|
|
|
return response
|
|
|
}
|
|
|
};
|
|
|
- // 链接数据服务器查询数据
|
|
|
- let end_time = Utc::now().timestamp_millis();
|
|
|
- let start_time = end_time - minute_time_range * 60 * 1000;
|
|
|
+
|
|
|
let trades_response = get_trades_json(
|
|
|
exchange.as_str(),
|
|
|
symbol.as_str(),
|