Metadata-Version: 2.4
Name: carrac-sdk
Version: 0.1.0
Summary: Official Python SDK for Carrac — market data, plays, alerts, usage
Project-URL: Homepage, https://carrac.cc
Project-URL: Documentation, https://app.carrac.cc/api/docs
Project-URL: Source, https://github.com/pgyula86/carrac-sdk-python
Author-email: Carrac <hello@carrac.cc>
License-Expression: MIT
Keywords: carrac,crypto,market-data,sdk,trading
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.9
Requires-Dist: httpx>=0.25
Provides-Extra: dev
Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
Requires-Dist: pytest>=7; extra == 'dev'
Description-Content-Type: text/markdown

# Carrac Python SDK

Official Python client for the [Carrac](https://carrac.cc) API. Use it to fetch market data, manage plays, create alerts, and inspect your API usage from any Python application.

## Install

```bash
pip install carrac-sdk
```

Requires Python ≥ 3.9 and a Carrac Premium subscription (API keys require Premium).

## Quick start

```python
from carrac import Client

cvx = Client(api_key="carrac_k_...")

# Market data
chart = cvx.charts.get("BTC", timeframe="4h", indicators="CPR,RSI")

# Composite call — everything about an asset in one request
detail = cvx.composite.asset_detail("BTC", format="compact")

# Create an alert
cvx.alerts.create(symbol="BTC", alert_type="price", condition="above", price=120000)

# Scanner
ranked = cvx.scanner.list(direction="long", verdict="STRONG,GOOD")

# Your usage
usage = cvx.usage.get()
print(usage["rest"]["usage"])  # [{window:"minute", used:7, limit:240, remaining:233}, ...]
```

## Authentication

1. Go to **Settings → API & Developer** in the Carrac dashboard.
2. Click **Create Key**, copy the full key (shown once).
3. Use it with `Client(api_key=...)` or set `CARRAC_API_KEY` in your environment.

## Features

- Per-user scoped keys — every call is rate-limited against your own Premium budget.
- Automatic 429 backoff honouring `Retry-After`.
- Pagination iterators for list endpoints.
- Works in any Python ≥ 3.9 runtime (CPython, PyPy, Lambda, serverless).

## Docs

Interactive API reference: https://app.carrac.cc/api/docs
OpenAPI spec: https://app.carrac.cc/api/openapi.json
