This repository contains working examples of how to build, test, and run automated trading strategies using the AlgoTest API.
It is intended as a learning resource and starter-kit for developers who want to integrate AlgoTest with their own systematic trading workflows.
This folder contains the demo strategies built on the AlgoTest Trade Signals API.
It showcases:
- Authentication flow
- Fetching contracts
- WebSocket connection for live candles
- Strategy implementation (EMA-based crossover)
- Creating & sending trade signals via AlgoTest API
Users who want to just give trades and send them programmatically.
This folder contains the structured strategy engine, built around AlgoTest OMS and Signals API. It includes:
strategy_payload.json– defines your strategy (legs, lots, SL/target, expiry, instrument type, etc.)strategy.py– core engine that reads payloads and live data, then executes tradessignals_api.py– wrapper for AlgoTest trade signal APImain.py– orchestration (login, fetch contracts, start WebSocket, run strategy)- Other helpers (
algotest_login.py,contracts_fetch.py,option_chain_websocket.py)
Users who want complex strategies with Python code.
Strategies can be defined entirely in JSON (e.g., ATM straddle, spreads, multi-leg option setups).
git clone https://github.com/Algo-Test/algotest-api-trading.git
cd algotest-api-tradingEach folder contains its own README.md file with:
- Detailed explanations of the files inside
- Full code walkthroughs
- Example strategy configurations
- Additional usage instructions
For step-by-step guides, open the README.md inside either TradeSignals/ or SignalsAPI/.
This repository is provided for educational and development purposes only. Trading in derivatives involves significant financial risk, including the potential loss of capital.
- Always test strategies in paper trading mode before going live.
- Ensure that you understand the risks of options and derivatives trading.
- AlgoTest and the contributors to this repo are not responsible for any financial losses that may occur from using these examples.