API - Tutorial

This step-by-step tutorial shows how you can automate subscribed SignalBoa signals via Freqtrade (https://www.freqtrade.io/). It relies only on publicly available open-source python projects and uses our SignalBoa’s Python Connector (https://pypi.org/project/signalboa/).


Step 1. (Optional) Install Conda

This step is not needed for the system to run, although we strongly recommend using Conda to create a separate python environment. If you have not already installed Conda, follow this user guide.



Step 2. Download and Install Freqtrade

If you are using Conda, Freqtrade is easily installed with the following commands:

# download freqtrade
git clone https://github.com/freqtrade/freqtrade.git


# enter downloaded directory ‘freqtrade’
cd freqtrade


# create the python environment from the freqtrade environment file
conda env create -n freqtrade-conda -f environment.yml


If you prefer an alternative installation method, please refer to the Freqtrade user guide. (https://www.freqtrade.io/en/stable/installation/#installation-with-conda). 

Step 3. Setup Freqtrade

To be able to run strategies with Freqtrade, you need to initialize the user directory and the configuration file.

# activate the created freqtrade conda environment

conda activate freqtrade-conda


# initialize the user folder

freqtrade create-userdir –userdir user_data


# create a new configuration file

freqtrade new-config –config config.json

To test if the setup was successful, you can use the sample strategy, that is shipped with every freqtrade installation.


freqtrade trade –config config.json –strategy SampleStrategy

Step 4. Copy Configuration and Strategy File

To be able to execute trades based on SignalBoa signals, you need to install the python connector into the Freqtrade Conda environment.


pip install signalboa

Now, you need to copy the provided configuration file (SignalBoa_config.json) into the Freqtrade folder (/freqtrade), as well as the SignalBoa strategy file (SignalBoa_strategy.py) in the strategy subfolder of the user directory (/freqtrade/user_data/strategies).

Step 5. Customize Configuration and Strategy File

In the configuration file, add the coin pairs you want to trade (and for which you have a subscription) to the pair_whitelist in the exchange section. Depending on the number of pairs, you should also adjust the max_open_trades to be the sum of the whitelisted pairs. The initial setup of the file is done for a dry-run on the Binance exchange. To further configure, please consult the Freqtrade documentation (https://www.freqtrade.io/en/stable/configuration/). 

In the strategy file, add your API-key (Line 55), that you can create under the https://signalboa.com/my-account/brainalyzed-api/, and select the correct Signal time frame e.g. “4h”. 

Then you can run Freqtrade with the provided SignalBoa signals like:

freqtrade trade –config SignalBoa_config.json –strategy SignalBoaStrategy


Step 6. Inspecting the Strategy

You can use the Freqtrade UI to inspect the running Freqtrade bot visually, by browsing to the locally spawned HTTP Server localhost:8080 via the browser. To use the Freqtrade UI you install first with:


freqtrade install-ui

You can login to the bot and inspect its performance. 

Let us know if you have any questions