use crate::pocketoption::error::PocketResult;
use crate::pocketoption::types::Deal;
use async_trait::async_trait;
use rust_decimal::Decimal;
use uuid::Uuid;
#[async_trait]
pub trait Market: Send + Sync {
async fn buy(&self, asset: &str, amount: Decimal, time: u32) -> PocketResult<(Uuid, Deal)>;
async fn sell(&self, asset: &str, amount: Decimal, time: u32) -> PocketResult<(Uuid, Deal)>;
async fn balance(&self) -> Decimal;
async fn result(&self, trade_id: Uuid) -> PocketResult<Deal>;
}