|
|
@@ -7,7 +7,7 @@ use tokio::sync::Mutex;
|
|
|
use tracing::trace;
|
|
|
use exchanges::cointr_swap_rest::CointrSwapRest;
|
|
|
use exchanges::response_base::ResponseData;
|
|
|
-use exchanges::cointr_swap_ws::{CointrSwapLogin, CointrSwapWs, CointrSwapWsType};
|
|
|
+use exchanges::cointr_swap_ws::{CointrSwapLogin, CointrSwapSubscribeType, CointrSwapWs, CointrSwapWsType};
|
|
|
|
|
|
const ACCESS_KEY: &str = "";
|
|
|
const SECRET_KEY: &str = "";
|
|
|
@@ -69,7 +69,7 @@ async fn ws_custom_subscribe() {
|
|
|
|
|
|
let fun = move |data: ResponseData| {
|
|
|
async move {
|
|
|
- // trace!("---传入的方法~~~~{:?}", data);
|
|
|
+ trace!("---传入的方法~~~~{:?}", data);
|
|
|
}
|
|
|
};
|
|
|
let param = CointrSwapLogin {
|
|
|
@@ -79,11 +79,15 @@ async fn ws_custom_subscribe() {
|
|
|
};
|
|
|
let t1 = tokio::spawn(async move {
|
|
|
let mut ws = get_ws(Option::from(param), CointrSwapWsType::PublicAndPrivate);
|
|
|
- ws.set_symbols(vec!["ETH_USDT".to_string()]);
|
|
|
+ ws.set_symbols(vec![
|
|
|
+ "BTC_USDT".to_string()
|
|
|
+ // , "ARB_USDT".to_string(),
|
|
|
+ // "ETH_USDT".to_string(),
|
|
|
+ ]);
|
|
|
ws.set_subscribe(vec![
|
|
|
- // CointrSwapSubscribeType::PuFuturesTrades,
|
|
|
- // CointrSwapSubscribeType::PuFuturesDepth,
|
|
|
- // CointrSwapSubscribeType::PuFuturesRecords,
|
|
|
+ CointrSwapSubscribeType::PuFuturesTrades,
|
|
|
+ CointrSwapSubscribeType::PuFuturesDepth,
|
|
|
+ CointrSwapSubscribeType::PuFuturesRecords,
|
|
|
]);
|
|
|
//链接
|
|
|
let bool_v3_clone = Arc::clone(&is_shutdown_arc);
|
|
|
@@ -103,7 +107,6 @@ fn get_ws(btree_map: Option<CointrSwapLogin>, ws_type: CointrSwapWsType) -> Coin
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
//查詢合約基礎信息
|
|
|
#[tokio::test]
|
|
|
async fn rest_get_market_test() {
|