2. Modules

TradingBot is composed by different modules organised by their nature. Each section of this document provide a description of the module meaning along with the documentation of its internal members.

2.1. TradingBot

2.2. Interfaces

The Interfaces module contains all those interfaces with external services used by TradingBot. The Broker class is the wrapper of all the trading services and provides the main interface for the strategies to access market data and perform trades.

2.2.1. IGInterface

2.2.2. AVInterface

2.2.2.1. Enums

2.2.3. Broker

2.2.3.1. Enums

2.2.4. Market

class Interfaces.Market.Market[source]

Represent a tradable market with latest price information

2.2.5. MarketProvider

class Interfaces.MarketProvider.MarketProvider(config, broker)[source]

Provide markets from different sources based on configuration. Supports market lists, dynamic market exploration or watchlists

get_market_from_epic(epic)[source]

Given a market epic id returns the related market snapshot

next()[source]

Return the next market from the configured source

reset()[source]

Reset internal market pointer to the beginning

2.2.5.1. Enums

class Interfaces.MarketProvider.MarketSource[source]

Available market sources: local file list, watch list, market navigation through API, etc.

2.3. Strategies

The Strategies module contains the strategies used by TradingBot to analyse the markets. The Strategy class is the parent from where any custom strategy must inherit from. The other modules described here are strategies available in TradingBot.

2.3.1. Strategy

2.3.2. StrategyFactory

2.3.3. SimpleMACD

2.3.4. Weighted Average Peak Detection

2.4. Utils

Common utility classes and methods

2.4.1. Utils

2.4.2. Enums

2.4.3. Exceptions