DIY Distributed Trading Platform
This is a proof of concept implementation of a distributed trading platform/system using only open source technologies. It was implemented as a complement to a talk at PyconDE2025.
So far only the Kraken derivatives exchange is implemented and supported.
- Python3.13 + libraries (see pyproject.toml for details)
- Kafka for component communication
- uv as build system
- docker for test containers
- Install uv
- have docker compose installed, if you want to use the provided kafka container
- Get API key and secret for Kraken futures
- sign up at Kraken futures - e.g. at the demo environment
- create and retrieve API key + secret
- create .env file based on .env_template and fill details
- base urls depending on the environment you use (see here for details)
- API key and secret from previous step
- URL of Kafka broker - if you're using the provided container, keep
localhost:9092
- [optional] run docker compose file for kafka container:
docker compose -f docker/docker-compose.yml upormake start-kafka - run marketdata provider:
uv run marketdata_provider - run order excecution engine:
uv run order_execution_engine - run example strategy:
uv run buy_on_small_spread_strategy
If you want to learn more about the structure and decisions made, have a look at the presentation.