Browse Source

清理警告

JiahengHe 1 year ago
parent
commit
4916ca3ddc
2 changed files with 2 additions and 76 deletions
  1. 2 2
      global/src/log_utils.rs
  2. 0 74
      standard/src/phemex_swap.rs

+ 2 - 2
global/src/log_utils.rs

@@ -1,7 +1,7 @@
 use std::collections::HashMap;
 use std::fmt::Debug;
 use std::io;
-use tracing::{Event, Subscriber, warn};
+use tracing::{Event, Subscriber};
 use tracing_appender_timezone::non_blocking::WorkerGuard;
 use tracing_subscriber::{fmt, Layer};
 use tracing_subscriber::layer::{Context, SubscriberExt};
@@ -60,7 +60,7 @@ pub fn send_remote_err_log(msg: String) {
             Ok(_resp) => {
                 // let body = _resp.text().await.unwrap();
             }
-            Err(err) => {
+            Err(_err) => {
                 // warn!("log的error监听器发送远端报错失败:{:?}", err);
             }
         }

+ 0 - 74
standard/src/phemex_swap.rs

@@ -12,7 +12,6 @@ use tokio::spawn;
 use tokio::time::Instant;
 use tracing::{error, info, trace, warn};
 use exchanges::phemex_swap_rest::PhemexSwapRest;
-use exchanges::response_base::ResponseData;
 use crate::{Platform, ExchangeEnum, Account, Position, Ticker, Market, Order, OrderCommand, PositionModeEnum, utils};
 use global::trace_stack::TraceStack;
 
@@ -637,77 +636,4 @@ pub fn format_order_item(order: Value, ct_val: Decimal) -> Order {
         trace_stack: TraceStack::new(0, Instant::now()).on_special("669 trace_stack".to_string()),
     };
     return result;
-}
-
-fn get_market_info(_params: Value) -> ResponseData {
-    let aa = json!({"perpProductsV2": [{
-	"symbol": "u1000PEPEUSDT",
-	"code": 66041,
-	"type": "PerpetualV2",
-	"displaySymbol": "1000PEPE / USDT",
-	"indexSymbol": ".u1000PEPEUSDT",
-	"markSymbol": ".Mu1000PEPEUSDT",
-	"fundingRateSymbol": ".u1000PEPEUSDTFR",
-	"fundingRate8hSymbol": ".u1000PEPEUSDTFR8H",
-	"contractUnderlyingAssets": "1000 PEPE",
-	"settleCurrency": "USDT",
-	"quoteCurrency": "USDT",
-	"tickSize": "0.0000001",
-	"priceScale": 0,
-	"ratioScale": 0,
-	"pricePrecision": 7,
-	"baseCurrency": "1000 PEPE",
-	"description": "1000 PEPE/USDT perpetual contracts are priced on the .u1000PEPEUSDT Index. Each contract is worth 1 1000PEPE. Funding fees are paid and received every 8 hours at UTC time: 00:00, 08:00 and 16:00.",
-	"status": "Listed",
-	"tipOrderQty": 0,
-	"listTime": "1683367200000",
-	"majorSymbol": false,
-	"defaultLeverage": "-10",
-	"fundingInterval": 28800,
-	"maxLeverage": 50,
-	"leverageMargin": 1015,
-	"maxOrderQtyRq": "400000000",
-	"maxPriceRp": "2000",
-	"minOrderValueRv": "1",
-	"minPriceRp": "0.001",
-	"qtyPrecision": 0,
-	"qtyStepSize": "1.0",
-	"tipOrderQtyRq": "80000000",
-	"maxOpenPosLeverage": 50.0
-}, {
-	"symbol": "EDUUSDT",
-	"code": 66241,
-	"type": "PerpetualV2",
-	"displaySymbol": "EDU / USDT",
-	"indexSymbol": ".EDUUSDT",
-	"markSymbol": ".MEDUUSDT",
-	"fundingRateSymbol": ".EDUUSDTFR",
-	"fundingRate8hSymbol": ".EDUUSDTFR8H",
-	"contractUnderlyingAssets": "EDU",
-	"settleCurrency": "USDT",
-	"quoteCurrency": "USDT",
-	"tickSize": "0.0001",
-	"priceScale": 0,
-	"ratioScale": 0,
-	"pricePrecision": 4,
-	"baseCurrency": "EDU",
-	"description": "EDU/USDT perpetual contracts are priced on the .EDUUSDT Index. Each contract is worth 1 EDU. Funding fees are paid and received every 8 hours at UTC time: 00:00, 08:00 and 16:00.",
-	"status": "Listed",
-	"tipOrderQty": 0,
-	"listTime": "1683367200000",
-	"majorSymbol": false,
-	"defaultLeverage": "-10",
-	"fundingInterval": 28800,
-	"maxLeverage": 50,
-	"leverageMargin": 1015,
-	"maxOrderQtyRq": "800000",
-	"maxPriceRp": "2000000",
-	"minOrderValueRv": "1",
-	"minPriceRp": "1.0",
-	"qtyPrecision": 0,
-	"qtyStepSize": "1.0",
-	"tipOrderQtyRq": "160000",
-	"maxOpenPosLeverage": 50.0
-}]});
-    ResponseData::new("".to_string(), 200, "".to_string(), aa)
 }