use crate::{clients::spot::BnSpot, data::book_ticker::BnBookTickerStream};
use tokio::sync::mpsc;
use xapi_shared::{data::crypto_symbol::CryptoSymbol, ws::error::SharedWsError};
impl BnSpot {
pub async fn subscribe_book_ticker(
&self,
symbol: &CryptoSymbol,
) -> Result<mpsc::Receiver<Result<BnBookTickerStream, SharedWsError>>, SharedWsError> {
self.executor
.subscribe_stream(format!("{}@bookTicker", symbol.as_str().to_lowercase()))
.await
}
}