The technology in the field of quantitative trading is becoming increasingly complex. To simplify this process and improve trading efficiency, we have developed EasyXT—a secondary development encapsulation library based on xtquant from miniqmt. EasyXT aims to provide a user-friendly and easy-to-use API interface, helping traders easily access quantitative trading.


Project Address: https://github.com/quant-king299/EasyXT
🚀 Feature Overview:
- Simplified API: Encapsulates the complex QMT interface, providing a concise Python API that lowers the development threshold for quantitative trading.
- Real Trading Support: Users can directly conduct real stock trading through the EasyXT interface.
- Data Acquisition: Integrates various data sources such as qstock and akshare, making it easy for users to obtain various financial data.
- Technical Indicators: Built-in calculations for commonly used technical indicators to assist in trading strategy development.
- Strategy Development Framework: Provides a complete framework for developing quantitative strategies, helping users build trading strategies from scratch.
- Rich Learning Examples: Covers tutorials from basic to advanced trading, helping users quickly get started.
📚 Quick Start:
Installing EasyXT is very simple; just clone the project repository and install the dependencies:
git clone https://github.com/quant-king299/EasyXT.git
cd EasyXT
pip install -r requirements.txt
Next, configure the QMT client and project settings, and you can start using EasyXT.
Code Example:
from easy_xt import EasyXT
# Create API instance
api = EasyXT()
# Initialize data service and get stock price
api.init_data()
data = api.get_price('000001.SZ', count=100)
print(data.head())
EasyXT not only provides basic data acquisition interfaces but also supports trading operations:
# Initialize trading service and buy stocks
api.init_trade(USERDATA_PATH)
api.add_account(ACCOUNT_ID)
order_id = api.buy(account_id=ACCOUNT_ID, code='000001.SZ', volume=100, price_type='market')
🏗️ Project Structure:
<span>easy_xt/</span>: Core API module, including data interfaces, trading interfaces, etc.<span>Learning Examples/</span>: A wealth of learning cases covering various levels of teaching.<span>config/</span>: Configuration files for setting QMT and project parameters.<span>data/</span>,<span>logs/</span>: Data storage directory and log directory.
⚠️ Risk Warning:
- Quantitative trading involves investment risks; please operate cautiously.
- It is recommended to test strategies in a simulated environment to ensure their effectiveness.
- Reasonably control positions, set stop-loss and take-profit, and comply with regulatory requirements.
Conclusion:
EasyXT is a powerful and easy-to-use quantitative trading library suitable for users ranging from beginners to professional traders. With a unified interface design, intelligent parameter handling, and comprehensive error handling, EasyXT makes quantitative trading development simpler and more efficient. Feel free to clone this project and start your quantitative trading journey! A series of follow-up usage tutorials will be released, so please stay tuned.