trade-executor
is a Python framework for backtesting and live execution of algorithmic trading strategies on decentralised exchanges.
Note: This is early beta software. Please pop in to the Discord for any questions.
- Only trading framework that has been built grounds up for decentralised finance
- High quality documentation
- Support decentralised markets like Uniswap, PancakeSwap
- Backtesting enginer
- Live trading
- Webhook web server for JavaScript frontend and monitoring system integration
- Deploy as Docker container
You need to know
- Basics of Python
- Basics of trading
- We have collected learning material for developers new to algorithmic trading
First study the example code
- Read documentation on running and backtesting strategies
- Visit Trading Strategy website to learn about algorithmic trading on decentralised exchanges
- Join the Discord for any questions
Note: The project is under active development. We recommend any developers to use Github master branch for installations.
As dependency line for Poetry pyproject.yml
:
[tool.poetry.dependencies]
# Remove Python 3.11 pin down after upstream dependency issues are resolved
python = ">=3.10,<3.11"
# extras=["all"] does not seem to work here. Poetry bug?
trade-executor = {git = "https://github.com/tradingstrategy-ai/trade-executor.git", extras = ["web-server", "execution", "quantstats", "data"], rev = "master" }
Checking out from Github to make contributions:
git clone [email protected]:tradingstrategy-ai/trade-executor.git
cd trade-executor
git submodule update --init --recursive
# Extra dependencies
# - execution: infrastructure to run live strategies
# - web-server: support webhook server of live strategy executors
# - qstrader: still needed to run legacy unit tests
poetry install --all-extras
Or with pip:
pip install -e ".[web-server,execution,qstrader,quantstats]"
Or directly from Github URL:
pip install -e "git+https://github.com/tradingstrategy-ai/trade-executor.git@master#egg=trade-executor[web-server,execution,qstrader,quantstats]"
Limited file size by pre-commit hook
# The pre-commit hook checks the size of files before allowing a commit to proceed
# If a file exceeds the specified limit, the commit will be aborted
# Default MAX FILE SIZE is 35MB
# Run script setup
cd trade-executor
bash scripts/set-pre-commit-checkfilesize.sh
Here is an example of a live trading deployment of a trade-executor
package.