Skip to content

Algo-Test/algotest-api-trading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AlgoTest API Trading – Demo Strategies & Examples

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.


Repository Structure

1. TradeSignals/

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

Best for:

Users who want to just give trades and send them programmatically.


2. SignalsAPI/

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 trades
  • signals_api.py – wrapper for AlgoTest trade signal API
  • main.py – orchestration (login, fetch contracts, start WebSocket, run strategy)
  • Other helpers (algotest_login.py, contracts_fetch.py, option_chain_websocket.py)

Best for:

Users who want complex strategies with Python code.
Strategies can be defined entirely in JSON (e.g., ATM straddle, spreads, multi-leg option setups).


Quick Start

Clone the repo

git clone https://github.com/Algo-Test/algotest-api-trading.git
cd algotest-api-trading

More Information

Each 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/.


Disclaimer

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.

Made with ❤️ by the AlgoTest Team


About

This repository contains code examples and templates to help you trade on AlgoTest using our APIs. Any developer building custom strategies, this repo will guide you through the complete workflow starting from authentication to order execution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages