Skip to main content

xret-data

Trusted market data infrastructure for Xret.

Acquire, validate, and store crypto market data with explicit I/O boundaries and fail-closed quality guarantees. Consume typed live bar observations through the same provider-neutral market identity.

Install

uv add xret-data

Quick start

from xret.data import MarketData

md = MarketData()
bars = md.bars(
    exchange="binance", symbol="BTC/USDT",
    market="perpetual", settle="USDT", timeframe="1h",
)

result = bars.sync("2024-01-01", "2024-06-01")
result.require_complete()

df = bars.scan("2024-01-01", "2024-06-01").collect()

Live bars use an explicit async session and never change historical storage. Opt into a recent snapshot-to-live handoff when the consumer needs an ordered transition from historical data:

async with md.live(exchange="binance") as live:
    await live.subscribe_bar_updates(bars, bootstrap=True)
    update = await anext(live)

Key contracts

  • fetch — remote-only observation, never touches local state
  • sync — reconcile missing coverage, commit validated Parquet
  • scan — strict local read, raises CoverageError on gaps
  • scan_partial — local read with structured gap reporting
  • live — explicit async bar delivery and optional recent bootstrap, never writes historical state

Metadata

Release files for xret-data 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xret-data 0.4.0
File Size Uploaded
xret_data-0.4.0.tar.gz 70.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xret-data 0.4.0
File Interpreter ABI Platform
xret_data-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 157.5 kB

Release files / xret_data-0.4.0.tar.gz

Download URL xret_data-0.4.0.tar.gz
Size 70.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3c04b51fc2ddd1027e3a91a1202f5535c1e2f76dd664e4aad1b8ce48d04ca8ba
BLAKE2b-256 checksum
How to use checksums
8daac71aecf5b6a4d825a8c9c3b75cb0b8e61785c6ecb2a06ff3d561f4f2ad8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / xret_data-0.4.0-py3-none-any.whl

Download URL xret_data-0.4.0-py3-none-any.whl
Size 86.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed75e6c6e4721834bb95a5416a61671aab57bead5612ccf45b54792b533b4f97
BLAKE2b-256 checksum
How to use checksums
18d0f1d657f673acd5774ab4cafa80d801006c115471dc192828b207a5324b04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.1.0

2 release 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