Time to change BfxBot to Rustico

This commit is contained in:
Giulio De Pasquale 2021-03-02 17:17:13 +00:00
parent bf85e39c2c
commit d08e175ea7
2 changed files with 5 additions and 5 deletions

View File

@ -10,13 +10,13 @@ use crate::frontend::FrontendManagerHandle;
use crate::managers::ExchangeManager;
use crate::ticker::Ticker;
pub struct BfxBot {
pub struct Rustico {
ticker: Ticker,
exchange_managers: Vec<ExchangeManager>,
frontend_connector: FrontendManagerHandle,
}
impl BfxBot {
impl Rustico {
// TODO: change constructor to take SymbolPairs and not Symbol
pub fn new(
exchanges: Vec<ExchangeDetails>,
@ -28,7 +28,7 @@ impl BfxBot {
.map(|x| ExchangeManager::new(x, &trading_pairs))
.collect();
BfxBot {
Rustico {
ticker: Ticker::new(tick_duration),
exchange_managers,
frontend_connector: FrontendManagerHandle::new(),

View File

@ -8,7 +8,7 @@ use log::error;
use log::LevelFilter::Info;
use tokio::time::Duration;
use crate::bot::BfxBot;
use crate::bot::Rustico;
use crate::connectors::ExchangeDetails;
use crate::currency::{Symbol, SymbolPair};
@ -63,7 +63,7 @@ async fn main() -> Result<(), BoxError> {
SymbolPair::new(Symbol::DERIV_TESTBTC, Symbol::DERIV_TESTUSDT),
];
let mut bot = BfxBot::new(
let mut bot = Rustico::new(
vec![bitfinex],
pairs,
Duration::new(10, 0),