use crate::{
error::DataError,
event::MarketEvent,
subscription::{Map, SubKind},
};
use async_trait::async_trait;
use barter_integration::{
model::instrument::Instrument, protocol::websocket::WsMessage, Transformer,
};
use tokio::sync::mpsc;
pub mod book;
pub mod stateless;
#[async_trait]
pub trait ExchangeTransformer<Exchange, Kind>
where
Self: Transformer<Output = MarketEvent<Kind::Event>, Error = DataError> + Sized,
Kind: SubKind,
{
async fn new(
ws_sink_tx: mpsc::UnboundedSender<WsMessage>,
instrument_map: Map<Instrument>,
) -> Result<Self, DataError>;
}