use tokio::sync::oneshot;
use crate::api::parts::{Event};
use crate::msgs::account::OrderState;
use crate::msgs::responses::Response;
use crate::msgs::subscription::SubscriptionRequest;
#[allow(unused)]
type EventHandler = Box<dyn Fn(&Event) + Send + Sync>;
#[allow(unused)]
pub(crate) enum Command {
Subscribe(Vec<SubscriptionRequest>),
Tx {
request_id: u64,
json: String,
respond: oneshot::Sender<eyre::Result<Vec<Response>>>,
},
AsyncTx {
json: String,
},
SendRaw(String),
GetOrders {
symbol: Option<String>,
respond: oneshot::Sender<Vec<OrderState>>,
},
Shutdown,
}