Skip to main content

pull_market_info

Function pull_market_info 

Source
pub async fn pull_market_info(
    backend: &BackendConn,
    market_ids: &[i32],
) -> Result<Vec<MarketStatusItem>>
Expand description

发 CMD 6825 MarketInfoReq, 解析 response 成 MarketStatusItem 列表.

与 C++ PullMarketState() 对齐:

  1. market_id 字段填 request 集合 (caller 传).
  2. is_need_crypto_multi_broker = Some(true) 无条件设 (C++ 行为).
  3. 解 response infos 数组, 每条转为 MarketStatusItem, broker_id 缺失 → 0.

失败模式:

  • 网络错误 / decode 错 → Err (caller 决定 fallback)
  • response 中 code != 0 → Err with msg 字段