Time to change BfxBot to Rustico
This commit is contained in:
parent
bf85e39c2c
commit
d08e175ea7
@ -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(),
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user