Skip to content

Instantly share code, notes, and snippets.

@jayhuang75
Created November 6, 2020 19:58
Show Gist options
  • Select an option

  • Save jayhuang75/5fc975ec69b8dba212417ec86aab01ed to your computer and use it in GitHub Desktop.

Select an option

Save jayhuang75/5fc975ec69b8dba212417ec86aab01ed to your computer and use it in GitHub Desktop.
tradingbot.market.rs
pub trait Market {
async fn get_balances(&self) -> Result<f32, Box<dyn Error>>;
async fn get_market_price(&self) -> Result<f32, Box<dyn Error>>;
async fn place_sell_order(&self, amount: f32) -> Result<f32, Box<dyn Error>>;
async fn place_buy_order(&self, amount: f32) -> Result<f32, Box<dyn Error>>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment