Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ccxt-exchanges/src/bitget/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl BitgetWs {
///
/// # Arguments
///
/// * `symbols` - List of trading pair symbols (e.g., ["BTCUSDT", "ETHUSDT"])
/// * `symbols` - List of trading pair symbols (e.g., `["BTCUSDT", "ETHUSDT"]`)
pub async fn subscribe_tickers(&self, symbols: &[String]) -> Result<()> {
let mut args = Vec::new();
for symbol in symbols {
Expand All @@ -141,7 +141,7 @@ impl BitgetWs {
);
arg_map.insert(
"instId".to_string(),
serde_json::Value::String(symbol.to_string()),
serde_json::Value::String(symbol.clone()),
);
args.push(serde_json::Value::Object(arg_map));
}
Expand Down Expand Up @@ -170,7 +170,7 @@ impl BitgetWs {
///
/// # Arguments
///
/// * `symbols` - List of trading pair symbols (e.g., ["BTCUSDT", "ETHUSDT"])
/// * `symbols` - List of trading pair symbols (e.g., `["BTCUSDT", "ETHUSDT"]`)
///
/// # Returns
///
Expand Down
4 changes: 2 additions & 2 deletions ccxt-exchanges/src/bybit/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl BybitWs {
///
/// # Arguments
///
/// * `symbols` - List of trading pair symbols (e.g., ["BTCUSDT", "ETHUSDT"])
/// * `symbols` - List of trading pair symbols (e.g., `["BTCUSDT", "ETHUSDT"]`)
pub async fn subscribe_tickers(&self, symbols: &[String]) -> Result<()> {
let topics: Vec<String> = symbols.iter().map(|s| format!("tickers.{}", s)).collect();

Expand All @@ -141,7 +141,7 @@ impl BybitWs {
///
/// # Arguments
///
/// * `symbols` - List of trading pair symbols (e.g., ["BTCUSDT", "ETHUSDT"])
/// * `symbols` - List of trading pair symbols (e.g., `["BTCUSDT", "ETHUSDT"]`)
///
/// # Returns
///
Expand Down
6 changes: 3 additions & 3 deletions ccxt-exchanges/src/okx/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl OkxWs {
///
/// # Arguments
///
/// * `symbols` - List of trading pair symbols (e.g., ["BTC-USDT", "ETH-USDT"])
/// * `symbols` - List of trading pair symbols (e.g., `["BTC-USDT", "ETH-USDT"]`)
pub async fn subscribe_tickers(&self, symbols: &[String]) -> Result<()> {
let mut args = Vec::new();
for symbol in symbols {
Expand All @@ -126,7 +126,7 @@ impl OkxWs {
);
arg_map.insert(
"instId".to_string(),
serde_json::Value::String(symbol.to_string()),
serde_json::Value::String(symbol.clone()),
);
args.push(serde_json::Value::Object(arg_map));
}
Expand Down Expand Up @@ -154,7 +154,7 @@ impl OkxWs {
///
/// # Arguments
///
/// * `symbols` - List of trading pair symbols (e.g., ["BTC-USDT", "ETH-USDT"])
/// * `symbols` - List of trading pair symbols (e.g., `["BTC-USDT", "ETH-USDT"]`)
///
/// # Returns
///
Expand Down
8 changes: 8 additions & 0 deletions tests/integration/common/assertions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ pub fn create_test_ticker(symbol: &str) -> Ticker {
percentage: None,
average: None,
vwap: None,
funding_rate: None,
open_interest: None,
index_price: None,
mark_price: None,
info: HashMap::new(),
}
}
Expand Down Expand Up @@ -561,6 +565,10 @@ mod tests {
percentage: None,
average: None,
vwap: None,
funding_rate: None,
open_interest: None,
index_price: None,
mark_price: None,
info: HashMap::new(),
};

Expand Down