|
|
@@ -65,9 +65,10 @@ pub async fn htx_swap_run(is_shutdown_arc: Arc<AtomicBool>,
|
|
|
let is_shutdown_arc_c1 = is_shutdown_arc.clone();
|
|
|
let write_tx_am_private = Arc::new(Mutex::new(write_tx_private));
|
|
|
spawn(async move {
|
|
|
+ let login_param = parse_btree_map_to_htx_swap_login(exchange_params);
|
|
|
// 构建链接ws
|
|
|
let mut bg_private = HtxSwapWs::new_label(name.clone(),
|
|
|
- Some(parse_btree_map_to_htx_swap_login(exchange_params)),
|
|
|
+ Some(login_param),
|
|
|
HtxSwapWsType::Private);
|
|
|
|
|
|
// 消费数据的函数
|
|
|
@@ -105,6 +106,7 @@ async fn on_private_data(core_arc_clone: Arc<Mutex<Core>>,
|
|
|
let position_channel = "positions_cross";
|
|
|
let balance_channel = "accounts_cross";
|
|
|
if response.channel.contains(order_channel) { // 订单频道
|
|
|
+ info!("订单推送: {}", response.data);
|
|
|
trace_stack.set_source("htx_swap.orders".to_string());
|
|
|
let orders = standard::handle_info::HandleSwapInfo::handle_order(HtxSwap, response.clone(), ct_val.clone());
|
|
|
let mut order_infos:Vec<OrderInfo> = Vec::new();
|
|
|
@@ -147,7 +149,6 @@ async fn on_public_data(core_arc_clone: Arc<Mutex<Core>>,
|
|
|
let depth_channel = format!("market.{}.depth.step0", channel_symbol.to_uppercase());
|
|
|
// public类型,目前只考虑订单流数据
|
|
|
if response.channel == depth_channel { // 深度频道
|
|
|
- info!("htx_depth {:?}", response);
|
|
|
trace_stack.set_source("htx_usdt_swap.depth".to_string());
|
|
|
let special_depth = standard::handle_info::HandleSwapInfo::handle_special_depth(HtxSwap, &response);
|
|
|
trace_stack.on_after_format();
|