瀏覽代碼

bybit的Buy和binance的Buy不是一个意思,哈哈哈……

skyffire 9 月之前
父節點
當前提交
781a45e18c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      standard/src/bybit_swap_handle.rs

+ 1 - 1
standard/src/bybit_swap_handle.rs

@@ -111,7 +111,7 @@ pub fn handle_force_order(res_data: &ResponseData) -> ForceOrder {
     let side = json_value["side"].as_str().unwrap().to_string();
     let price = Decimal::from_str(json_value["price"].as_str().unwrap()).unwrap();
     let mut amount = Decimal::from_str(json_value["size"].as_str().unwrap()).unwrap();
-    if side == "Sell" {
+    if side == "Buy" {
         amount = -amount
     }
     let mut value = price * amount;