Metadata-Version: 2.4
Name: stakt
Version: 1.0.2
Summary: Official Python Client for the Stakt Trading Platform
Home-page: https://github.com/stakt/stakt-python-sdk
Author: Stakt
Author-email: hello@stakt.tech
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.1
Requires-Dist: python-dotenv>=0.19.0
Requires-Dist: httpx>=0.24.0
Requires-Dist: pydantic>=2.0
Requires-Dist: websockets>=11.0
Requires-Dist: click>=8.0
Requires-Dist: rich>=13.0
Requires-Dist: textual>=0.40.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: tenacity>=8.0.0
Requires-Dist: filelock>=3.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

<div align="center">
  <h1>Stakt Python SDK</h1>
  <p><strong>The official Python client for the Stakt Algorithmic Trading Platform.</strong></p>
  
  [![Python Version](https://img.shields.io/badge/python-3.7%2B-blue.svg)](https://www.python.org/downloads/)
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
</div>

---

The Stakt Python SDK provides a robust, typed, and resilient interface to log your algorithmic trades to [Stakt](https://stackt.tech). It is built for high-frequency trading (HFT) environments, ensuring no data loss during network outages through a local SQLite fallback queue.

## Documentation

**[📚 Read the Official Documentation at docs.stackt.tech](https://stackt.tech)**

## Installation

```bash
pip install stakt
```
*(Note: If you install via `pip install stakt-sdk`, it will resolve to the same package)*

## Quickstart

Configure your environment with your Stakt Sync Token:

```bash
export STAKT_SYNC_TOKEN="your_sync_token_here"
```

Use the client in your trading algorithm:

```python
from stakt import StaktClient

# Initialize the client with offline_mode to queue trades during network outages
with StaktClient(offline_mode=True) as client:
    
    client.log_trade(
        symbol="EURUSD",
        side="buy",
        volume=1.5,
        profit=145.50,
        strategy="SMC_Breakout"
    )
```

For high-frequency use cases, the SDK provides a fully asynchronous client (`AsyncStaktClient`) built on `httpx`. Please refer to the [official documentation](https://stackt.tech) for advanced usage, DataFrame exports, and CLI tools.

## Features

- **Pydantic Validation**: Strict type checking and data validation before network requests.
- **Circuit Breaker**: Prevents DDoS-ing your own memory during Stakt API downtime.
- **Offline Queue**: Safe, file-locked SQLite queue to gracefully handle temporary network loss.
- **Asyncio Support**: Native non-blocking HTTP integration.

## License

MIT License. See [LICENSE](LICENSE) for more information.
