|
|
@@ -508,7 +508,7 @@ impl Platform for CoinexSwap {
|
|
|
amount: Default::default(),
|
|
|
deal_amount: Default::default(),
|
|
|
avg_price: Default::default(),
|
|
|
- status: "NULL".to_string(),
|
|
|
+ status: "REMOVE".to_string(),
|
|
|
order_type: "".to_string(),
|
|
|
trace_stack: TraceStack::new(0, Instant::now()).on_special("485 coinex_swap".to_string())
|
|
|
};
|
|
|
@@ -518,6 +518,12 @@ impl Platform for CoinexSwap {
|
|
|
result.id = order_id.to_string();
|
|
|
}
|
|
|
Ok(result)
|
|
|
+ } else if res_data.code == -1 && res_data.message.contains("3103:order not exists") { // 未成交已取消的订单会报不存在
|
|
|
+ let mut order = Order::new();
|
|
|
+ order.id = order_id.to_string();
|
|
|
+ order.custom_id = custom_id.to_string();
|
|
|
+ order.status = "REMOVE".to_string();
|
|
|
+ Ok(order)
|
|
|
} else {
|
|
|
let message = format!("撤单HTTP请求失败 order_id: {}, custom_id: {}, res_data: {:?}", order_id, custom_id, res_data);
|
|
|
Err(Error::new(ErrorKind::Other, message))
|