trading_client/datastructures/client.rs
1use super::{
2 asset::Asset,
3 config::Config,
4 order::{Order, OrderResponse},
5};
6use async_trait::async_trait;
7
8#[async_trait]
9pub trait TradingClient {
10 fn new(config: &Config) -> Self
11 where
12 Self: Sized;
13 async fn create_order(&self, order: &Order) -> Result<(), Box<dyn std::error::Error>>; // TODO: OrderResponse
14 async fn get_asset(&self, symbol: &str) -> Result<Asset, Box<dyn std::error::Error>>;
15}