|
|
@@ -94,18 +94,18 @@ pub fn truncate_decimal_places(num: f64, decimal_places: usize) -> f64 {
|
|
|
// 单元测试集
|
|
|
#[cfg(test)]
|
|
|
mod tests {
|
|
|
- use crate::exchange_middle_ware::{get_binance_depth, get_binance_klines};
|
|
|
+ // use crate::exchange_middle_ware::{get_binance_depth, get_binance_klines};
|
|
|
use super::*;
|
|
|
|
|
|
- #[tokio::test]
|
|
|
- async fn test_get_spread() {
|
|
|
- let depth = get_binance_depth(&"BTC_USDT".to_string(), 100i32).await;
|
|
|
- let ask = depth.asks[0].price;
|
|
|
- let bid = depth.bids[0].price;
|
|
|
-
|
|
|
- println!("ask={}, bid={}", ask, bid);
|
|
|
- println!("{:?}", get_spread(&depth))
|
|
|
- }
|
|
|
+ // #[tokio::test]
|
|
|
+ // async fn test_get_spread() {
|
|
|
+ // let depth = get_binance_depth(&"BTC_USDT".to_string(), 100i32).await;
|
|
|
+ // let ask = depth.asks[0].price;
|
|
|
+ // let bid = depth.bids[0].price;
|
|
|
+ //
|
|
|
+ // println!("ask={}, bid={}", ask, bid);
|
|
|
+ // println!("{:?}", get_spread(&depth))
|
|
|
+ // }
|
|
|
|
|
|
#[test]
|
|
|
fn test_std_n_by_records() {
|