|
@@ -510,7 +510,7 @@ impl Platform for CoinexSwap {
|
|
|
avg_price: Default::default(),
|
|
avg_price: Default::default(),
|
|
|
status: "NULL".to_string(),
|
|
status: "NULL".to_string(),
|
|
|
order_type: "".to_string(),
|
|
order_type: "".to_string(),
|
|
|
- trace_stack: TraceStack::new(0, Instant::now()).on_special("485 coinex_swap".to_string())
|
|
|
|
|
|
|
+ trace_stack: TraceStack::new(0, Instant::now()).on_special("513 coinex_swap".to_string())
|
|
|
};
|
|
};
|
|
|
} else {
|
|
} else {
|
|
|
result = format_order_item(res_data_json, ct_val, "canceled");
|
|
result = format_order_item(res_data_json, ct_val, "canceled");
|
|
@@ -643,8 +643,11 @@ impl Platform for CoinexSwap {
|
|
|
let handle = spawn(async move {
|
|
let handle = spawn(async move {
|
|
|
let result = self_clone.cancel_order(&order_id, &custom_id).await;
|
|
let result = self_clone.cancel_order(&order_id, &custom_id).await;
|
|
|
match result {
|
|
match result {
|
|
|
- Ok(_) => {
|
|
|
|
|
- // self_clone.order_sender.send(order).await.unwrap();
|
|
|
|
|
|
|
+ Ok(order) => {
|
|
|
|
|
+ if order.status == "REMOVE" {
|
|
|
|
|
+ // 由于有时撤单成功ws不推送,所以加入rest
|
|
|
|
|
+ self_clone.order_sender.send(order).await.unwrap();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
Err(error) => {
|
|
Err(error) => {
|
|
|
// info!("撤单失败:{:?}", error.to_string());
|
|
// info!("撤单失败:{:?}", error.to_string());
|
|
@@ -762,7 +765,7 @@ pub fn format_order_item(order: Value, ct_val: Decimal, status: &str) -> Order {
|
|
|
avg_price,
|
|
avg_price,
|
|
|
status: custom_status,
|
|
status: custom_status,
|
|
|
order_type: "limit".to_string(),
|
|
order_type: "limit".to_string(),
|
|
|
- trace_stack: TraceStack::new(0, Instant::now()).on_special("688 trace_stack".to_string()),
|
|
|
|
|
|
|
+ trace_stack: TraceStack::new(0, Instant::now()).on_special("765 trace_stack".to_string()),
|
|
|
};
|
|
};
|
|
|
return rst_order;
|
|
return rst_order;
|
|
|
}
|
|
}
|