浏览代码

订单状态识别修改

JiahengHe 1 年之前
父节点
当前提交
dedf870424
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      standard/src/phemex_swap.rs
  2. 1 1
      standard/src/phemex_swap_handle.rs

+ 1 - 1
standard/src/phemex_swap.rs

@@ -626,7 +626,7 @@ pub fn format_order_item(order: Value, ct_val: Decimal) -> Order {
         custom_status = "NULL".to_string()
     } else if vec!["Filled", "Canceled"].contains(&status) {
         custom_status = "REMOVE".to_string()
-    } else if vec!["New", "Init", "Created"].contains(&status) {
+    } else if vec!["New", "Init", "Created", "PartiallyFilled"].contains(&status) {
         custom_status = "NEW".to_string()
     } else {
         error!("gate_swap:格式化订单状态错误!\nformat_order_item:order={:?}", order);

+ 1 - 1
standard/src/phemex_swap_handle.rs

@@ -97,7 +97,7 @@ pub fn format_order_item(order: &Value, ct_val: Decimal) -> Order {
 
     let status = order["ordStatus"].as_str().unwrap();
     let custom_status;
-    if vec!["Rejected", "Filled", "Canceled"].contains(&status) {
+    if vec!["Filled", "Canceled"].contains(&status) {
         custom_status = "REMOVE".to_string()
     } else if vec!["New", "Init", "Created", "PartiallyFilled"].contains(&status) {
         custom_status = "NEW".to_string()