Skip to main content

Module services

Module services 

Source
Expand description

Optional framework-side services wired in via builder methods on Bot:

  • MarketFeedServiceBot::with_market_source(...). Drives a MarketSource under supervisor control; the source publishes events to the in-process MarketDataBus (the bus reference is the source implementor’s responsibility — typically obtained via bot.market_data_bus().clone() before construction).
  • FillRoutingServiceBot::with_fill_source(...). Polls a FillSource, calls Brain::on_fill on each brain, refreshes the per-symbol position cache from the exchange, and auto-feeds realised PnL into the risk gates using weighted-average entry accounting.
  • CandlePollerServiceBot::with_candle_poller(...). Periodic poll of a CandleSource; publishes the newest closed candle for each (symbol, interval) pair to the market-data bus.

Structs§

CandlePollerService
Periodic poll of a CandleSource for a single (symbol, interval) pair. Publishes each newly-closed candle to the MarketDataBus.
FillRoutingService
Routes fills from a FillSource to every brain, refreshes the position cache, and auto-feeds realised PnL into the risk state.
MarketFeedService
Drives a MarketSource under supervisor control.