Setup your Workspace
Prerequisites¶
You will need the following to start with Pyalgotrading:
-
AlgoBulls Account¶
To upload and test your strategies, you will need this account. You can create your account for FREE on the AlgoBulls website.
-
Developer Key¶
To access the features, you will need a developer key. The key can be obtained as follows:
- Step 1: Activate the Advanced Phoenix Plan from the Pricing menu.
- Step 2: Get the Developer Key from the Settings section.
Please Note
For security reasons, the developer key will get reset every time you log out from your AlgoBulls account.
Once you have the developer key, you can access the AlgoBulls platform using
pyalgotrading
functions. -
Python 3.10+¶
The Pyalgotrading platform can run all strategies that conform to Python 3.8 or higher. However, we recommend Python 3.10 or higher.
Python Tips
- It is a good idea to set up a virtual environment first while installing Python 3.10.
- Once Python is installed, most packages are easily installed in your venv using
pip install
command
-
Pyalgotrading Package¶
To create and execute your fully automated trading strategies, you only need to install
pyalgotrading
. You can install thepyalgotrading
package using the following command: -
Jupyter Notebook¶
You will use a Jupyter Notebook to connect to the AlgoBulls platform. Using the notebook, you can upload the strategy, test your strategy (Backtesting, Paper Trading, or Real Trading), and fetch logs.
Install Jupyter Notebook using the following command:
Pro Tip
If you are an experienced Pyalgotrading user, Jupyter Notebook might not be necessary. You can directly integrate it into your application.
-
Enhancing Productivity¶
For enhancing your productivity while building and executing strategies using Pyalgotrading, you can make use of Python IDEs of your choice, such as: