// about
A framework that picks one exchange and means it.
Most open-source crypto trading frameworks try to support every exchange. dgbit does the opposite. The data fetcher, execution layer, and built-in strategies are all written against Bybit specifically, so the abstractions can be exact rather than lowest-common-denominator. That decision is the project's design center.
What dgbit is
dgbit is a Python algorithmic trading framework for cryptocurrency strategies on Bybit spot markets. It ships as a single repository containing the trading core, a backtester, a FastAPI REST service, an NNG-based service bus, and a Vue 3 dashboard. You can use any subset: import the library for backtests, run the API server for a control surface, or bring up the whole stack with docker-compose.
It's distributed on PyPI as pip install dgbit and as a Docker image at cryptuon/dgbit. The license is MIT.
The philosophy
Three principles drive the design:
- Exchange-specific over abstraction-first. Multi-exchange wrappers force every operation through the slowest common path. dgbit binds to Bybit so the data fetcher, order types, and position model can match the real API one-to-one.
- Strategy plugin model, not a strategy language. Custom strategies subclass
BaseStrategyand register throughstrategy_registry. There is no YAML DSL, no JSON config sublanguage, no "expression engine" to learn. If you can write a Python class, you can write a strategy. - Backtest and live share the same interface. The
Backtesterand the live execution engine consume strategies through the same protocol, so a researcher's notebook code can move to production without an intermediate rewrite step.
What it ships
The README lists the concrete deliverables:
- Four built-in strategies: Wavelet Reversal (Daubechies wavelet decomposition for mean reversion), MA Crossover (trend following), RSI (momentum), and Bollinger Bands (volatility breakout).
- An in-memory backtester driven by a
BacktestConfig(initial capital, transaction fee), returning total return, win rate, and max drawdown along with interactive Plotly reports. - A FastAPI backend exposing
/api/health,/api/backtests,/api/jobs,/api/data,/api/strategies, and/api/execution. - A WebSocket event stream at
/api/ws/eventsemittingjob.created,job.completed,job.failed,trade.entered,trade.exited, andsignal.generated. - A Vue 3 dashboard for charts, portfolio view, strategy state, and monitoring.
- A Docker Compose deployment that brings up every service together.
How to engage
If you want to use dgbit, the fastest path is pip install dgbit and the quickstart in the docs. Configure Bybit credentials in a .env file and keep BYBIT_TESTNET=true until you have backtested the strategy you actually want to run.
If you want to contribute, clone the repo, pip install -e ".[dev]", and run the test suite with pytest dgbit-api/tests/. The README points at a Contributing Guide on the docs site.
Maintainers
dgbit is a project of cryptuon. The README does not attribute a specific named maintainer set beyond the organization, so we won't either; PRs and issues land in the same place regardless.
A note on risk
The README's disclaimer applies to this site too: trading cryptocurrencies involves significant risk. dgbit is provided for educational and research purposes. Past performance does not guarantee future results. Test strategies with paper trading before risking real funds.