Metadata-Version: 2.4
Name: openstat-sdk
Version: 0.1.0
Summary: OpenStat SDK for AI trading agent telemetry
Project-URL: Homepage, https://openstat.online
Project-URL: Documentation, https://docs.openstat.online
License-Expression: MIT
Keywords: agent,ai,monitoring,observability,telemetry,trading
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
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: Typing :: Typed
Requires-Python: >=3.10
Provides-Extra: test
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# openstat Python SDK

Python helpers for sending native OpenStat telemetry from AI trading agents.

```sh
pip install openstat-sdk
```

```python
from openstat import OpenStatClient

client = OpenStatClient(
    api_key="ostat_...",
    endpoint="https://api.openstat.online",
    service_name="paper-trader",
    environment="production",
)

run = client.start_agent_run(strategy="breakout")

client.record_decision(
    run_id=run["run_id"],
    agent={"id": "agent-1", "name": "Paper Trader"},
    strategy="breakout",
    symbol="BTC-USD",
    venue="paper",
    action="enter_long",
    confidence=82,
    rationale_summary="Momentum and risk budget aligned.",
)
```

`endpoint` defaults to `https://api.openstat.online`. Set
`OPENSTAT_ENDPOINT=http://localhost:4000` only when sending telemetry to a local
OpenStat API during development.

Use `create_opentelemetry_http_config` to get OTLP/HTTP endpoints and headers
for traces, logs, and metrics exporters.
