htx_handle_test.rs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // mod exchange_test;
  2. //
  3. // use tracing::{instrument};
  4. // use exchanges::htx_swap_ws::HtxSwapSubscribeType;
  5. // use standard::exchange::ExchangeEnum;
  6. // use crate::exchange_test::{test_new_exchange_wss};
  7. //
  8. // const SYMBOL: &str = "USTC_USDT";
  9. //
  10. // // 测试订阅深度订阅
  11. // #[tokio::test(flavor = "multi_thread", worker_threads = 4)]
  12. // #[instrument(level = "TRACE")]
  13. // async fn test_get_wss_depth() {
  14. // global::log_utils::init_log_with_trace();
  15. //
  16. // let htx_subscribe_type = vec![
  17. // HtxSwapSubscribeType::PuFuturesDepth
  18. // ];
  19. // test_new_exchange_wss(ExchangeEnum::HtxSwap, SYMBOL, htx_subscribe_type, "depth").await;
  20. // }
  21. //
  22. // // 测试订阅Account信息
  23. // #[tokio::test(flavor = "multi_thread", worker_threads = 4)]
  24. // #[instrument(level = "TRACE")]
  25. // async fn test_get_wss_account() {
  26. // global::log_utils::init_log_with_trace();
  27. //
  28. // let htx_subscribe_type = vec![
  29. // HtxSwapSubscribeType::PrFuturesBalances
  30. // ];
  31. // test_new_exchange_wss(ExchangeEnum::HtxSwap, SYMBOL, htx_subscribe_type, "account").await;
  32. // }
  33. //
  34. // // 测试订阅Position信息
  35. // #[tokio::test(flavor = "multi_thread", worker_threads = 4)]
  36. // #[instrument(level = "TRACE")]
  37. // async fn test_get_wss_position() {
  38. // global::log_utils::init_log_with_trace();
  39. //
  40. // let htx_subscribe_type = vec![
  41. // HtxSwapSubscribeType::PrFuturesPositions
  42. // ];
  43. // test_new_exchange_wss(ExchangeEnum::HtxSwap, SYMBOL, htx_subscribe_type, "position").await;
  44. // }
  45. //
  46. // // 测试订阅Orders信息
  47. // #[tokio::test(flavor = "multi_thread", worker_threads = 4)]
  48. // #[instrument(level = "TRACE")]
  49. // async fn test_get_wss_orders() {
  50. // global::log_utils::init_log_with_trace();
  51. //
  52. // let htx_subscribe_type = vec![
  53. // HtxSwapSubscribeType::PrFuturesOrders
  54. // ];
  55. // test_new_exchange_wss(ExchangeEnum::HtxSwap, SYMBOL, htx_subscribe_type, "orders").await;
  56. // }