|
|
@@ -177,7 +177,7 @@ async fn rest_get_tickers_test() {
|
|
|
let req_data = ret.get_tickers("DOGEUSDT".to_string()).await;
|
|
|
println!("Bybit--查詢最新行情信息--{:?}", req_data);
|
|
|
}
|
|
|
-//rest-查詢最新行情信息
|
|
|
+//rest-查詢市場價格K線數據
|
|
|
#[tokio::test]
|
|
|
async fn rest_get_kline_test() {
|
|
|
global::log_utils::init_log_with_trace();
|
|
|
@@ -293,17 +293,16 @@ async fn rest_cancel_order_test() {
|
|
|
println!("Bybit--撤单--{:?}", req_data);
|
|
|
}
|
|
|
|
|
|
+//rest-撤銷所有訂單
|
|
|
+#[tokio::test]
|
|
|
+async fn rest_cancel_orders_test() {
|
|
|
+ global::log_utils::init_log_with_trace();
|
|
|
+
|
|
|
+ let mut ret = get_rest();
|
|
|
+ let req_data = ret.cancel_orders("DOGEUSDT".to_string()).await;
|
|
|
+ println!("Bybit--撤銷所有訂單--{:?}", req_data);
|
|
|
+}
|
|
|
|
|
|
-// //rest-查詢實時委託單
|
|
|
-// #[tokio::test]
|
|
|
-// async fn rest_get_order_test() {
|
|
|
-// global::log_utils::init_log_with_trace();
|
|
|
-//
|
|
|
-// let mut ret = get_rest();
|
|
|
-// let req_data = ret.get_order("BTCUSDT".to_string(),
|
|
|
-// "".to_string(), "".to_string()).await;
|
|
|
-// println!("Bybit--查詢可交易產品的規格信息--{:?}", req_data);
|
|
|
-// }
|
|
|
|
|
|
|
|
|
async fn get_ws(btree_map: Option<BybitSwapLogin>, type_v: BybitSwapWsType) -> BybitSwapWs {
|