Metadata-Version: 2.4
Name: talyxion
Version: 0.2.6
Summary: Official Python SDK for Talyxion (talyxion.com) — signals, screener, datafields, rates terminal, simulations, and realtime streaming.
Project-URL: Homepage, https://talyxion.com
Project-URL: Documentation, https://talyxion.com/docs/sdk/python/
Project-URL: Source, https://github.com/khanhtrinh2003/talyxion-python
Project-URL: Issues, https://github.com/khanhtrinh2003/talyxion-python/issues
Author-email: Talyxion <support@talyxion.com>
License: MIT License
        
        Copyright (c) 2026 khanhtrinh2003
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: fintech,quant,sdk,signals,talyxion,trading
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Requires-Dist: pydantic<3,>=2.6
Requires-Dist: websockets>=13
Provides-Extra: cli
Requires-Dist: click>=8.1; extra == 'cli'
Requires-Dist: keyring>=24; extra == 'cli'
Requires-Dist: platformdirs>=4; extra == 'cli'
Requires-Dist: rich>=13; extra == 'cli'
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: twine>=5; extra == 'dev'
Provides-Extra: pandas
Requires-Dist: pandas>=2; extra == 'pandas'
Description-Content-Type: text/markdown

# Talyxion Python SDK

Official sync Python client for the [Talyxion](https://talyxion.com) REST API and realtime streams.

```bash
pip install talyxion
```

## Quick start

```python
from talyxion import Talyxion

client = Talyxion(api_key="tk_...")  # or set TALYXION_API_KEY

# Daily trading signals
page = client.signals.list(date="2026-04-27", asset_class="crypto", min_conviction=0.7)
for sig in page.items:
    print(sig.ticker, sig.side, sig.conviction)

# Ticker snapshot
info = client.ticker("VIC").info()
print(info.latest_signal.entry_price, info.stats.win_rate)

# Rates terminal
snapshot = client.rates.snapshot()
ten_year = client.rates.series("DGS10")

# Run an alpha simulation and stream progress
for event in client.stream.sim_progress(task_id):
    print(event.progress, event.message)
    if event.status in ("done", "error"):
        break
```

## Authentication

Pass your API key via constructor or the `TALYXION_API_KEY` env var. Keys are
issued from the Talyxion dashboard and require an `api` or `institutional`
subscription tier.

## Resources (v0.1)

| Namespace | Methods |
|---|---|
| `client.status()` | API health + key info |
| `client.signals` | `list`, `history` |
| `client.screener` | `run` |
| `client.datafields` | `list`, `get(key)` |
| `client.ticker(t)` | `info` |
| `client.rates` | `snapshot`, `series`, `suggest`, `yahoo` |
| `client.simulations` | `get(task_id)`, `wait(task_id)` |
| `client.stream` | `sim_progress(task_id)`, `feed_events()` |

## Errors

All exceptions inherit from `TalyxionError`. Common subclasses:

- `TalyxionAuthError` — missing/invalid/expired key (401)
- `TalyxionTierError` — subscription tier insufficient (402)
- `TalyxionPermissionError` — scope or IP denied (403)
- `TalyxionNotFoundError` — resource missing (404)
- `TalyxionRateLimitError` — IP or daily quota exceeded (429); has `.retry_after`
- `TalyxionServerError` — backend 5xx

## Optional pandas helpers

```bash
pip install talyxion[pandas]
```

```python
df = client.signals.list(date="2026-04-27").to_dataframe()
```

## License

MIT — see [LICENSE](LICENSE).
