File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ impl BitgetWs {
126126 ///
127127 /// # Arguments
128128 ///
129- /// * `symbols` - List of trading pair symbols (e.g., ["BTCUSDT", "ETHUSDT"])
129+ /// * `symbols` - List of trading pair symbols (e.g., ` ["BTCUSDT", "ETHUSDT"]` )
130130 pub async fn subscribe_tickers ( & self , symbols : & [ String ] ) -> Result < ( ) > {
131131 let mut args = Vec :: new ( ) ;
132132 for symbol in symbols {
@@ -141,7 +141,7 @@ impl BitgetWs {
141141 ) ;
142142 arg_map. insert (
143143 "instId" . to_string ( ) ,
144- serde_json:: Value :: String ( symbol. to_string ( ) ) ,
144+ serde_json:: Value :: String ( symbol. clone ( ) ) ,
145145 ) ;
146146 args. push ( serde_json:: Value :: Object ( arg_map) ) ;
147147 }
@@ -170,7 +170,7 @@ impl BitgetWs {
170170 ///
171171 /// # Arguments
172172 ///
173- /// * `symbols` - List of trading pair symbols (e.g., ["BTCUSDT", "ETHUSDT"])
173+ /// * `symbols` - List of trading pair symbols (e.g., ` ["BTCUSDT", "ETHUSDT"]` )
174174 ///
175175 /// # Returns
176176 ///
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ impl BybitWs {
114114 ///
115115 /// # Arguments
116116 ///
117- /// * `symbols` - List of trading pair symbols (e.g., ["BTCUSDT", "ETHUSDT"])
117+ /// * `symbols` - List of trading pair symbols (e.g., ` ["BTCUSDT", "ETHUSDT"]` )
118118 pub async fn subscribe_tickers ( & self , symbols : & [ String ] ) -> Result < ( ) > {
119119 let topics: Vec < String > = symbols. iter ( ) . map ( |s| format ! ( "tickers.{}" , s) ) . collect ( ) ;
120120
@@ -141,7 +141,7 @@ impl BybitWs {
141141 ///
142142 /// # Arguments
143143 ///
144- /// * `symbols` - List of trading pair symbols (e.g., ["BTCUSDT", "ETHUSDT"])
144+ /// * `symbols` - List of trading pair symbols (e.g., ` ["BTCUSDT", "ETHUSDT"]` )
145145 ///
146146 /// # Returns
147147 ///
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ impl OkxWs {
115115 ///
116116 /// # Arguments
117117 ///
118- /// * `symbols` - List of trading pair symbols (e.g., ["BTC-USDT", "ETH-USDT"])
118+ /// * `symbols` - List of trading pair symbols (e.g., ` ["BTC-USDT", "ETH-USDT"]` )
119119 pub async fn subscribe_tickers ( & self , symbols : & [ String ] ) -> Result < ( ) > {
120120 let mut args = Vec :: new ( ) ;
121121 for symbol in symbols {
@@ -126,7 +126,7 @@ impl OkxWs {
126126 ) ;
127127 arg_map. insert (
128128 "instId" . to_string ( ) ,
129- serde_json:: Value :: String ( symbol. to_string ( ) ) ,
129+ serde_json:: Value :: String ( symbol. clone ( ) ) ,
130130 ) ;
131131 args. push ( serde_json:: Value :: Object ( arg_map) ) ;
132132 }
@@ -154,7 +154,7 @@ impl OkxWs {
154154 ///
155155 /// # Arguments
156156 ///
157- /// * `symbols` - List of trading pair symbols (e.g., ["BTC-USDT", "ETH-USDT"])
157+ /// * `symbols` - List of trading pair symbols (e.g., ` ["BTC-USDT", "ETH-USDT"]` )
158158 ///
159159 /// # Returns
160160 ///
Original file line number Diff line number Diff line change @@ -394,6 +394,10 @@ pub fn create_test_ticker(symbol: &str) -> Ticker {
394394 percentage : None ,
395395 average : None ,
396396 vwap : None ,
397+ funding_rate : None ,
398+ open_interest : None ,
399+ index_price : None ,
400+ mark_price : None ,
397401 info : HashMap :: new ( ) ,
398402 }
399403}
@@ -561,6 +565,10 @@ mod tests {
561565 percentage : None ,
562566 average : None ,
563567 vwap : None ,
568+ funding_rate : None ,
569+ open_interest : None ,
570+ index_price : None ,
571+ mark_price : None ,
564572 info : HashMap :: new ( ) ,
565573 } ;
566574
You can’t perform that action at this time.
0 commit comments