Fork me on GitHub

Events #

As described in the architecture events play a key role in the complete system: they relay all information between separate components (like plugins). This makes the codebase scalable, testable and it separates concerns.

if you run the Gekko UI events are relayed between core components as well as broadcasted (via the UI server) to the web UI. This means that all events broadcasted by any plugin automatically end up in the web UI.

Note that all events from Gekko come from a plugin (with the exception of the candle event, which comes from the market), and no plugin is required for Gekko to run, this means it might be possible that some events are never broadcasted since their originating plugin is not active. If a plugin wants to listen to an event that will never be broadcasted (because of a lack of another plugin) this will be warned in the console like so:

(WARN): Paper Trader wanted to listen to the tradingAdvisor, however the tradingAdvisor is disabled.

List of events emitted by standard plugins #

Beside those there are also two additional market events that are only emitted when Gekko is running in realtime mode (NOT during a backtest for performance reasons).

candle event #

stratWarmupCompleted event #

stratCandle event #

stratUpdate event #

stratNotification event #

advice event #

tradeInitiated event #

tradeAborted event #

tradeCancelled event #

tradeErrored event #

tradeCompleted event #

portfolioChange event #

portfolioValueChange event #

performanceReport event #

roundtripInitiated event #

roundtripUpdate event #

roundtrip event #

triggerCreated event #

triggerFired event #

triggerAborted event #

marketStart event #

marketUpdate event #