A modular system to automatically connect to DNSE/Entrade, receive price data and execute trades based on user-defined strategies.
- 🧠 Define and plug in your own trading strategies
- ⚡ Automated trade execution when signals are triggered
- 📊 Real-time market data
- 🛠 Modular design for brokers, strategies, and risk modules
git clone https://github.com/ChungkhoanPhaisinh/AutoTrade.git
cd AutoTradepip install -r requirements.txtFill-in your login data & other configures to "config.json" file
python main.pyAll trading bots (agents) are stored in the agents/ folder.
To build your own bot:
- Create a new file inside the
agents/folder. - Inherit from the
Agentclass. - Implement your custom trading logic.
- Add the bot to
ACTIVE_BOTvariable insidelogic_processor.py. - Change logic in
logic_processor.pyto execute more complex logic.
The folder /tunnel is an independent module, used to create a tunnel to execute order through API. To use it:
- Download cloudflared at: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/
- Run main.py to generate "entrade_client_data.json" inside "/tunnel" (main.py could be closed after)
- Run tunnel.py
This project is for educational and research purposes only. Trading involves risk, and past performance does not guarantee future results. Use at your own responsibility.
Contributions, issues, and feature requests are welcome! Feel free to open a PR.