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 statesync— reconcile missing coverage, commit validated Parquetscan— strict local read, raisesCoverageErroron gapsscan_partial— local read with structured gap reportinglive— explicit async bar delivery and optional recent bootstrap, never writes historical state
Links
Metadata
Release files for xret-data 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xret_data-0.5.1.tar.gz | 83.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xret_data-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 186.2 kB
Release files / xret_data-0.5.1.tar.gz
| Download URL | xret_data-0.5.1.tar.gz |
|---|---|
| Size | 83.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88c3d697da8a764fa795f41028ffa3614abe110047bf49270bc1a9ddbb73eca1
|
|
BLAKE2b-256 checksum How to use checksums |
eda54d2e3dd0fe16643b22ea91752aac450dd50acc5cf6b1b3844da0e629c3a2
|
| 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.5.1-py3-none-any.whl
| Download URL | xret_data-0.5.1-py3-none-any.whl |
|---|---|
| Size | 102.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f026f9b007e7e0e6669b76efba2b73ff7572efcc046149725e922bc60598b10
|
|
BLAKE2b-256 checksum How to use checksums |
4f9fc6b48456bff8f2d8c8621440a62ce7246fef0bb238804ab50f09e943f75f
|
| 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}
|