pub struct AppBootstrap<E: ExchangeFacade> {
pub exchange: E,
pub portfolio_store: PortfolioStateStore,
pub price_store: PriceStore,
pub event_log: EventLog,
pub execution: ExecutionService,
pub portfolio_sync: PortfolioSyncService,
pub market_data: MarketDataService,
}Fields§
§exchange: E§portfolio_store: PortfolioStateStore§price_store: PriceStore§event_log: EventLog§execution: ExecutionService§portfolio_sync: PortfolioSyncService§market_data: MarketDataServiceImplementations§
Source§impl<E: ExchangeFacade> AppBootstrap<E>
impl<E: ExchangeFacade> AppBootstrap<E>
pub fn new(exchange: E, portfolio_store: PortfolioStateStore) -> Self
Source§impl AppBootstrap<BinanceExchange>
impl AppBootstrap<BinanceExchange>
Sourcepub fn from_env(
portfolio_store: PortfolioStateStore,
) -> Result<Self, ExchangeError>
pub fn from_env( portfolio_store: PortfolioStateStore, ) -> Result<Self, ExchangeError>
Builds the real Binance-backed app bootstrap from environment variables.
Required:
BINANCE_API_KEYBINANCE_SECRET_KEY
Optional:
BINANCE_SPOT_BASE_URLBINANCE_FUTURES_BASE_URLBINANCE_MODE
pub fn switch_mode(&mut self, mode: BinanceMode) -> Result<(), ExchangeError>
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for AppBootstrap<E>where
E: Freeze,
impl<E> RefUnwindSafe for AppBootstrap<E>where
E: RefUnwindSafe,
impl<E> Send for AppBootstrap<E>where
E: Send,
impl<E> Sync for AppBootstrap<E>where
E: Sync,
impl<E> Unpin for AppBootstrap<E>where
E: Unpin,
impl<E> UnsafeUnpin for AppBootstrap<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for AppBootstrap<E>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more