AlgoGTT SDK (v1.1.0)
Official Python SDK and CLI for the AlgoGTT Algorithmic Trading Platform.
Provides direct programmatic access to:
- Trading Engine Lifecycle: Start / stop live or paper trading sessions, configure session duration (
market_close,1_hour,1_trade), and stream live engine logs. - Real-Time Chart Overlays: Access the exact same live signals, markers, SL/TSL, targets, and Smart Money Concept (SMC) Fair Value Gaps displayed on the web terminal.
- Position & Order Management: Query open broker positions, live orders, dynamic order shifting, and emergency square-offs.
- Option Strips & Greeks: Retrieve option chains, PCR, and implied volatilities.
- Daily EOD Reports: Generate and export end-of-day trading summaries in JSON or HTML.
Installation
pip install --upgrade algogtt
Authentication
Set your API Key from the AlgoGTT Profile page as an environment variable:
export ALGOGTT_API_KEY="your_api_key_here"
CLI Usage
The algogtt command-line utility provides instant control over the engine directly from your terminal:
# Unpack complete example scripts into an ./algogtt-examples/ folder:
algogtt init
# 1. Start an automated trading session
algogtt session start --symbol CRUDEOIL --strategy swing_breakout --scope market_close
# Add --live to route real orders to your connected broker:
algogtt session start --symbol CRUDEOIL --strategy swing_breakout --live
# 2. Check engine status & running PID
algogtt session status
# 3. Stream real-time execution logs
algogtt session logs
# 4. Stop the active session
algogtt session stop
# 5. Fetch real-time chart overlays & trade markers
algogtt overlays --symbol CRUDEOIL --strategy swing_breakout --timeframe 1m
# 6. List active broker positions & P&L
algogtt positions
# 7. List live orders
algogtt orders
# 8. Fetch daily EOD summary
algogtt eod --date 2026-09-11
Python SDK Reference
from algogtt import AlgoGTTClient
# Automatically reads ALGOGTT_API_KEY from environment, or pass api_key="..."
client = AlgoGTTClient()
# ----------------------------------------------------
# 1. Trading Engine Lifecycle
# ----------------------------------------------------
# Start session (Paper Mode)
client.engine.start(
symbol="CRUDEOIL",
strategy="swing_breakout",
session_duration="market_close", # 'market_close' | '1_hour' | '1_trade'
dry_run=True, # Set False for real live broker orders
)
# Inspect status & PID
status = client.engine.status(symbol="CRUDEOIL")
print("Engine Status:", status.get("is_running"), "PID:", status.get("pid"))
# Stream latest logs
for line in client.engine.logs():
print(line)
# Stop session
client.engine.stop()
# ----------------------------------------------------
# 2. Real-Time Chart Overlays & SMC Signals
# ----------------------------------------------------
overlays = client.live.get_overlays(
symbol="CRUDEOIL",
strategy="swing_breakout",
timeframe="1m"
)
print("Total Net P&L:", overlays.get("total_pnl"))
# Parsed trades
trades = client.live.get_trades(symbol="CRUDEOIL")
for t in trades:
print(t["option_symbol"], "Entry:", t.get("entry_price"), "SL:", t.get("current_sl"))
# ----------------------------------------------------
# 3. Positions & Orders
# ----------------------------------------------------
positions = client.trading.get_positions()
orders = client.trading.get_orders()
# Dynamic Trailing Stop Loss / Order Shift
# client.trading.shift_order(order_id="12345", symbol="CRUDEOIL", stop_loss=315.0)
# Square Off
# client.trading.square_off()
Examples & Client Integrations
See the examples/ directory for sample scripts:
live_engine_control.py: Start, monitor, and stop live engine sessions programmatically.fetch_live_overlays.py: Fetch real-time chart overlays, risk levels, and audit logs.parse_signals.py: Load candlestick data with strategy indicators into Pandas DataFrames.parse_trades.js: Native Node.js & React Native / Mobile fetch integration.- Excel & Google Sheets: Pull live JSON directly using Power Query.
Mobile & Multi-Platform Support
AlgoGTT uses an API-First Architecture. The Web Terminal (/terminal), Android App, iOS React Native App, CLI, and external bots all consume the same authenticated REST & SSE endpoints. Any backend enhancements immediately reflect across all interfaces.
Release files for algogtt 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| algogtt-1.1.0.tar.gz | 14.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| algogtt-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.5 kB
Release files / algogtt-1.1.0.tar.gz
| Download URL | algogtt-1.1.0.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65df6f1be7f45190d14acb0ab5c09aea8efbc62865a4c6bd219efc16b18cb70e
|
|
BLAKE2b-256 checksum How to use checksums |
7063b309d04a8e6d682df75a9cbfd6f9849700d3fe015f395d1f4090f19ddb58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / algogtt-1.1.0-py3-none-any.whl
| Download URL | algogtt-1.1.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80c54f053161a03933323b664441ef91798262bdbce87cbcb06b6218f98fbbd0
|
|
BLAKE2b-256 checksum How to use checksums |
3872eed17559e8384535d4b5084f327c3b10d3f939ba47f0e457d8f6a96aa175
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|