Skip to main content

auspicium

Python SDK for the Auspicium market data platform — crypto OHLCV, order books, trades, Polymarket prediction markets, and cross-market signals.

Install

pip install auspicium

Quick start

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

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 — free tier included.

Pointing the SDK at another environment

The SDK talks to whatever gateway AUSP_GATEWAY_URL points at (default https://api.auspicium.io). To exercise it against the Quality DaaS:

export AUSP_GATEWAY_URL=https://api.quality.auspicium.io
export AUSP_API_KEY=<your quality API key>

No localhost DaaS is ever required. The unit test suite is fully mocked; only tests/test_rest.py and tests/test_stream.py are integration tests that need a live gateway (set the two variables above to run them).

Changelog

See 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)

Releasing

Releases are cut from main and published to public PyPI by Cloud Build (project auspicium). CI (cloudbuild.ci.yaml) runs ruff + the unit suite on Python 3.11 and 3.12 for every push to dev and every PR; the release pipeline (cloudbuild.release.yaml) runs only on v* tags and publishes via PyPI Trusted Publishing (OIDC) — no PyPI credential is stored anywhere.

To ship a change as, e.g., 0.9.5:

  1. Develop on dev.

  2. In the same change as the feature/fix, bump auspicium/_version.py"0.9.5" and add the entry to both changelogs — the repo-root CHANGELOG.md and the bundled auspicium/CHANGELOG.md (including its "Current pin" line). Keep the two in sync: the bundled copy is frozen into the wheel at tag time and is what a stack pinned to this version reads forever (same for auspicium/CLAUDE.md, the bundled operator guide — update it if behavior it describes changed). SemVer: patch = bugfix, minor = feature, major = breaking.

  3. Push dev → CI runs pytest + ruff. Nothing is published.

  4. Human merges devmain (PRs into main require green CI).

  5. Human tags and pushes the tag — tags are human-only; agents never create or push tags:

    git tag v0.9.5
    git push origin v0.9.5
    
  6. The release trigger then:

    • guards: fails the build if the tag (v0.9.5) ≠ _version.py (0.9.5), so a mislabeled wheel can never ship;
    • re-runs the unit suite;
    • builds auspicium-0.9.5-py3-none-any.whl + .tar.gz;
    • uploads to PyPI with a short-lived OIDC-minted token.
  7. pip install -U auspicium now resolves 0.9.5.

PyPI versions are immutable. A version number uploads exactly once and can never be re-uploaded — even after deleting it on PyPI. If 0.9.5 ships broken, fix it by releasing 0.9.6; never try to re-tag or re-upload 0.9.5 — a wrong tag burns the version number permanently. (This is also why the tag-vs-version guard exists: get the bump in before tagging.)

Versions are live runtimes (stacks)

Platform users run the SDK through stacks, each pinned to a released version. The default stack runs whatever version is baked into the Studio workspace image (auspicium/workspace:latest) — it does not track PyPI automatically. Consequences:

  • Publishing makes a version available, not live. Uploading vX.Y.Z to PyPI is step one. It reaches default-stack users only after the studio repo bumps its AUSPICIUM_SDK_VERSION pin (.env) and rebuilds the workspace/bot images — a separate, gated flow (tracked as AUS-42). Users who want a published version sooner can create a custom stack pinned to it.
  • Old versions never die. Any released version remains a selectable stack runtime. Never yank or delete a PyPI release — existing stacks pin exact versions (and deletion wouldn't free the number anyway).
  • The changelog is the version picker. Stack owners choose a pin from the At-a-glance table — headlines must be accurate, and breaking changes must be flagged explicitly.

History note — do NOT retro-tag ≤ 0.9.4

This repo currently has no git tags: releases 0.8.0 → 0.9.4 on PyPI were published outside the tag-triggered pipeline, and the release guard has never fired. Do not create tags v0.9.4 or earlier "to backfill history" — each would trigger a doomed re-publish of an already-immutable version and a red build. The next tagged release is the first live run of this pipeline: watch it end-to-end.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auspicium-0.9.5.tar.gz (141.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auspicium-0.9.5-py3-none-any.whl (146.6 kB view details)

Uploaded Python 3

File details

Details for the file auspicium-0.9.5.tar.gz.

File metadata

  • Download URL: auspicium-0.9.5.tar.gz
  • Upload date:
  • Size: 141.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for auspicium-0.9.5.tar.gz
Algorithm Hash digest
SHA256 f46051c38c918a7c1a15685b858d00e37ece5a388b29c0ef7ad00ba045f63284
MD5 5f34bb45d2ad440c47bb44be7a351b86
BLAKE2b-256 4ebd3d367b9ae55d8b36b406d50ecf25fbd144b68a51abb518669d0b51ad9fde

See more details on using hashes here.

File details

Details for the file auspicium-0.9.5-py3-none-any.whl.

File metadata

  • Download URL: auspicium-0.9.5-py3-none-any.whl
  • Upload date:
  • Size: 146.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for auspicium-0.9.5-py3-none-any.whl
Algorithm Hash digest
SHA256 eecf780929dc91ae7a9e79aaec21c125eabcd781fdf16b00dd040b04dd6174fb
MD5 8e916891f15e8cf196864aaaf8752170
BLAKE2b-256 ebaa155554e233a44f150811a80d521138b0dcf08fdd0b4fb41b3693dabfc1f0

See more details on using hashes here.

Release history Release notifications | RSS feed

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.1

2 files

0.10.0

2 files

0.9.21

2 files

0.9.20

2 files

0.9.19

2 files

0.9.18

2 files

0.9.17

2 files

0.9.16

2 files

0.9.15

2 files

0.9.14

2 files

0.9.13

2 files

0.9.12

2 files

0.9.11

2 files

0.9.10

2 files

0.9.9

2 files

0.9.8

2 files

0.9.7

2 files

0.9.6

2 files

This release

0.9.5 This release

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.20

2 files

0.7.19

2 files

0.7.18

2 files

0.7.17

2 files

0.7.16

2 files

0.7.15

2 files

0.7.14

2 files

0.7.13

2 files

0.7.12

2 files

0.7.11

2 files

0.7.10

2 files

0.7.9

2 files

0.7.8

2 files

0.7.7

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page