|
|
@@ -9,7 +9,7 @@ use rust_decimal_macros::dec;
|
|
|
use serde_json::{json};
|
|
|
use futures::stream::FuturesUnordered;
|
|
|
use futures::{TryStreamExt};
|
|
|
-use tracing::{error, debug};
|
|
|
+use tracing::{error, debug, trace};
|
|
|
use crate::{Platform, ExchangeEnum, Account, Position, Ticker, Market, Order, OrderCommand, PositionModeEnum};
|
|
|
use exchanges::gate_swap_rest::GateSwapRest;
|
|
|
|
|
|
@@ -362,6 +362,14 @@ impl Platform for GateSwap {
|
|
|
result_sd.send(result).await.unwrap();
|
|
|
}
|
|
|
Err(error) => {
|
|
|
+ if error.to_string() == "ORDER_NOT_FOUND" {
|
|
|
+ let mut err_order = Order::new();
|
|
|
+ err_order.id = order_id;
|
|
|
+ err_order.custom_id = custom_id;
|
|
|
+ err_order.status = "REMOVE".to_string();
|
|
|
+
|
|
|
+ result_sd.send(err_order).await.unwrap();
|
|
|
+ }
|
|
|
err_sd.send(error).await.unwrap();
|
|
|
}
|
|
|
}
|
|
|
@@ -393,7 +401,7 @@ impl Platform for GateSwap {
|
|
|
}
|
|
|
Err(error) => {
|
|
|
let mut err_order = Order::new();
|
|
|
- err_order.custom_id = (*cid).clone();
|
|
|
+ err_order.custom_id = cid.clone();
|
|
|
err_order.status = "REMOVE".to_string();
|
|
|
|
|
|
result_sd.send(err_order).await.unwrap();
|