AI-powered SDK featuring algorithmic trading, backtesting, deployment on 100+ exchanges, and multiple optimization engines.
Project description
๐ QTradeX Core โ Build, Backtest & Optimize AI-Powered Crypto Trading Bots
๐ธ See screenshots.md for more visuals
๐ Read the core docs on QTradeX SDK DeepWiki
๐ค Explore the bots at QTradeX AI Agents DeepWiki
๐ฌ Join our Telegram Group for discussion & support
โก๏ธ TL;DR
QTradeX is a lightning-fast Python framework for designing, backtesting, and deploying algorithmic trading bots, built for crypto markets with support for 100+ exchanges, AI-driven optimization, and blazing-fast vectorized execution.
Like what we're doing? Give us a โญ!
๐ฏ Why QTradeX?
Whether you're exploring a simple EMA crossover or engineering a strategy with 20+ indicators and genetic optimization, QTradeX gives you:
โ
Modular Architecture
โ
Tulip + CCXT Integration
โ
Custom Bot Classes
โ
Fast, Disk-Cached Market Data
โ
Near-Instant Backtests (even on Raspberry Pi!)
๐ Features at a Glance
- ๐ง Bot Development: Extend
BaseBotto craft custom strategies - ๐ Backtesting: Plug-and-play CLI & code-based testing
- ๐งฌ Optimization: Use QPSO or LSGA to fine-tune parameters
- ๐ Indicators: Wrapped Tulip indicators for blazing performance
- ๐ Data Sources: Pull candles from 100+ CEXs/DEXs with CCXT
- ๐ Performance Metrics: Evaluate bots with ROI, Sortino, Win Rate
- ๐ค Speed: Up to 50+ backtests/sec on low-end hardware
โ๏ธ Project Structure
qtradex/
โโโ core/ # Bot logic and backtesting
โโโ indicators/ # Technical indicators
โโโ optimizers/ # QPSO and LSGA
โโโ plot/ # Trade/metric visualization
โโโ private/ # Execution & paper wallets
โโโ public/ # Data feeds and utils
โโโ common/ # JSON RPC, BitShares nodes
โโโ setup.py # Install script
๐ Quickstart
Install
git clone https://github.com/squidKid-deluxe/QTradeX-Algo-Trading-SDK.git QTradeX
cd QTradeX
pip install -e .
๐งช Example Bot: EMA Crossover
import qtradex as qx
import numpy as np
class EMACrossBot(qx.BaseBot):
def __init__(self):
self.tune = {"fast_ema": 10, "slow_ema": 50}
def indicators(self, data):
return {
"fast_ema": qx.ti.ema(data["close"], self.tune["fast_ema"]),
"slow_ema": qx.ti.ema(data["close"], self.tune["slow_ema"]),
}
def strategy(self, tick_info, indicators):
fast = indicators["fast_ema"]
slow = indicators["slow_ema"]
if fast > slow:
return qx.Buy()
elif fast < slow:
return qx.Sell()
return qx.Thresholds(buying=0.5 * fast, selling=2 * fast)
def plot(self, *args):
qx.plot(
self.info,
*args,
(
# key name label color axis idx axis name
("fast_ema", "EMA 1", "white", 0, "EMA Cross"),
("slow_ema", "EMA 2", "cyan", 0, "EMA Cross"),
)
)
# Load data and run
data = qx.Data(
exchange="kucoin",
asset="BTC",
currency="USDT",
begin="2020-01-01",
end="2023-01-01"
)
bot = EMACrossBot()
qx.dispatch(bot, data)
๐ See more bots in QTradeX AI Agents
๐ฆ Usage Guide
| Step | What to Do |
|---|---|
| 1๏ธโฃ | Build a bot with custom logic by subclassing BaseBot |
| 2๏ธโฃ | Backtest using qx.core.dispatch + historical data |
| 3๏ธโฃ | Optimize with qpso.py or lsga.py (tunes stored in /tunes) |
| 4๏ธโฃ | Deploy live |
๐งญ Roadmap
- ๐ More indicators (non-Tulip sources)
- ๐ฆ TradFi Connectors: Stocks, Forex, and Comex support
Want to help out? Check out the Issues list for forseeable improvements and bugs.
๐ Resources
- ๐ง QTradeX Algo Trading Strategies
- ๐ Tulipy Docs
- ๐ CCXT Docs
๐ License
WTFPL โ Do what you want. Just be awesome about it ๐
โญ Star History
โจ Ready to start? Clone the repo, run your first bot, and tune away. Once tuned - LET THE EXECUTIONS BEGIN!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qtradex-1.3.0-py3-none-any.whl.
File metadata
- Download URL: qtradex-1.3.0-py3-none-any.whl
- Upload date:
- Size: 150.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eb535a1894ea931ce18ea3c9e7dadbb2591a22147305ce858fe416c6792500f
|
|
| MD5 |
5024ebc7c95a7a23b7c61d98340d1e98
|
|
| BLAKE2b-256 |
108ebf8c065accd887d2829b055aeb39703d276e4c88d8ce1fa07eb430f2322a
|
Provenance
The following attestation bundles were made for qtradex-1.3.0-py3-none-any.whl:
Publisher:
publish.yml on squidKid-deluxe/QTradeX-Algo-Trading-SDK
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qtradex-1.3.0-py3-none-any.whl -
Subject digest:
0eb535a1894ea931ce18ea3c9e7dadbb2591a22147305ce858fe416c6792500f - Sigstore transparency entry: 780424224
- Sigstore integration time:
-
Permalink:
squidKid-deluxe/QTradeX-Algo-Trading-SDK@0c6f9a42034a8efa1f1e963672504efe5f9c6e3a -
Branch / Tag:
refs/tags/1.3.0 - Owner: https://github.com/squidKid-deluxe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c6f9a42034a8efa1f1e963672504efe5f9c6e3a -
Trigger Event:
release
-
Statement type: