Metadata-Version: 2.4
Name: algogtt
Version: 1.0.7
Summary: Python SDK for AlgoGTT Strategy Export API
Home-page: https://github.com/vrsolankiGH/SwingTradingSystem
Author: AlgoGTT in
Author-email: algogtt@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.25.0
Requires-Dist: pandas>=1.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# AlgoGTT SDK

Official Python SDK and CLI for interacting with AlgoGTT.

## Installation

```bash
pip install algogtt
```

## CLI Usage

```bash
export ALGOGTT_API_KEY="your_api_key_here"

# Hits the live algogtt.in server by default
algogtt analyze --symbol NIFTY
algogtt report --symbol BANKNIFTY
algogtt execute --symbol NIFTY --action BUY --capital 100000

# Override the URL for local testing
algogtt analyze --symbol NIFTY --url http://localhost:8000
```

## SDK Usage

```python
from algogtt import SwingClient

client = SwingClient(api_key="your_api_key_here")

result = client.analyze("NIFTY")
print(result["total_pnl"])
```

## Examples & Parsing Data

The strategy returns much more than just trades—it includes OHLCV candle data, strategy indicators (like MMM components), trailing stop loss activation levels, and explicit buy/sell signals for backtesting.

Check out the [examples/](examples/) directory for sample scripts:
- **[parse_trades.py](examples/parse_trades.py)**: Python script to parse and format basic trade executions.
- **[parse_signals.py](examples/parse_signals.py)**: Python script showing how to export the full candlestick data with strategy indicators into a Pandas DataFrame.
- **[parse_trades.js](examples/parse_trades.js)**: Node.js/JavaScript `fetch` example (useful for React Native / Expo mobile apps).
- **[No-Code Excel Guide](examples/README.md#3-integrating-with-microsoft-excel-or-google-sheets-no-code)**: Learn how to use Power Query to pull live JSON directly into your spreadsheet automatically.
