Metadata-Version: 2.4
Name: auspicium
Version: 0.9.4
Summary: Auspicium DaaS SDK — market data for crypto and prediction market quants
Author-email: Auspicium <technical.account@auspicium.io>
License: MIT
Keywords: market-data,crypto,polymarket,quant,finance,binance
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Developers
Classifier: Topic :: Office/Business :: Financial
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27
Requires-Dist: websockets>=13.0
Requires-Dist: pydantic>=2.6
Requires-Dist: pandas>=2.2
Requires-Dist: pyarrow>=15.0
Requires-Dist: typer>=0.12
Requires-Dist: rich>=13.7
Requires-Dist: pyyaml>=6.0
Provides-Extra: strategy
Requires-Dist: prometheus_client>=0.20; extra == "strategy"
Provides-Extra: backtest
Requires-Dist: vectorbt>=0.26; extra == "backtest"
Requires-Dist: plotly>=5.20; extra == "backtest"
Requires-Dist: scipy>=1.13; extra == "backtest"
Requires-Dist: auspicium[strategy]; extra == "backtest"
Provides-Extra: exchange
Requires-Dist: py-clob-client-v2>=1.0.1; extra == "exchange"
Requires-Dist: python-binance>=1.0.19; extra == "exchange"
Provides-Extra: api
Requires-Dist: fastapi>=0.110; extra == "api"
Requires-Dist: uvicorn>=0.29; extra == "api"
Provides-Extra: production
Requires-Dist: auspicium[strategy]; extra == "production"
Requires-Dist: auspicium[exchange]; extra == "production"
Requires-Dist: auspicium[api]; extra == "production"
Provides-Extra: all
Requires-Dist: auspicium[strategy]; extra == "all"
Requires-Dist: auspicium[backtest]; extra == "all"
Requires-Dist: auspicium[exchange]; extra == "all"
Requires-Dist: auspicium[api]; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: respx>=0.21; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"

# auspicium

Python SDK for the [Auspicium](https://auspicium.io) market data platform — crypto OHLCV, order books, trades, Polymarket prediction markets, and cross-market signals.

## Install

```bash
pip install auspicium
```

## Quick start

```python
import os
os.environ["AUSP_API_KEY"]     = "your-api-key"
os.environ["AUSP_GATEWAY_URL"] = "https://api.auspicium.io"

from auspicium import rest

# OHLCV candlestick data
df = rest.ohlcv("binance", "BTC-USDT", interval="5m", days=7)

# Order book snapshot
book = rest.orderbook("binance", "BTC-USDT", depth=20)

# Polymarket prediction markets
markets = rest.markets(status="active", base_asset="BTC")

# Cross-market signal (Binance x Polymarket)
cross = rest.cross_market(granularity="5m", base_asset="BTC", hours=48)
```

## WebSocket streaming

```python
from auspicium import stream

async with stream.connect() as ws:
    await ws.subscribe("ohlcv", source="binance", symbol="BTC-USDT")
    async for msg in ws:
        print(msg.channel, msg.payload)
```

## Get your API key

Sign up at [auspicium.io](https://auspicium.io) — free tier included.

## Changelog

See [CHANGELOG.md](https://github.com/auspicium-org/auspicium/blob/main/CHANGELOG.md)
for the full per-version history. The most recent entries (newest first):

| Version | Date       | Headline                                                                                                     |
| ------- | ---------- | ------------------------------------------------------------------------------------------------------------ |
| **0.9.0** | **2026-05-22** | **BREAKING:** `Fill.size` for Polymarket BUYs is now shares (was USDC). New `Fill.notional_usd`. state.db must be deleted on upgrade. |
| 0.8.0   | 2026-05-19 | Fix: `ProductionExchange.get_order_book` now delegates to the polymarket adapter (was returning `None`)      |
| 0.7.20  | 2026-05-19 | `MARKET_FAK` / `LIMIT_GTD` order types + `get_order_book` + `Strategy.book_depth_at_or_better`                |
| 0.7.19  | 2026-05-18 | Fix: `Strategy.submit()` pops `_open_orders` on `exchange.submit()` failure                                  |
| 0.7.18  | 2026-05-17 | Polymarket WS payload carries market metadata (`candle_open/close`, `active`, …). `BinaryMarketAggregator`. Heartbeat silent-reject WARN. |
| 0.7.17  | 2026-05-16 | Fix: `BacktestPaperExchange._positions` re-keyed by `(market, outcome)` — YES + NO no longer net             |
| 0.7.16  | 2026-05-15 | `RestConnector.address_stats` accepts arbitrary windows via `from_ts` / `to_ts`                              |
| 0.7.15  | 2026-05-15 | Copy-trading SDK (`address_trades`, `address_stats`, `tracked_addresses`, `address` WS channel, notebook helper) |
