Expand description
§tessera
The official Rust client for Tessera — order-flow-enriched OHLCV, funding-rate, and positioning datasets built from raw Hyperliquid trade data, delivered as Parquet over a REST API.
This crate is the Rust mirror of the
tessera-api Python SDK: point it
at a (dataset, coin, month) and read straight from object storage into
Polars or DuckDB over presigned
URLs — with predicate/projection pushdown, no temp files.
§Choosing a client
TesseraClient— blocking API. Owns a private tokio runtime, so do not construct it from inside an async runtime.AsyncTesseraClient—async fnsurface for tokio applications.
§Data engines
- Polars (default feature
polars):TesseraClient::scanreturns aLazyFrame;TesseraClient::readcollects aDataFrame. - DuckDB (opt-in feature
duckdb):TesseraClient::to_duckdbreturns an in-memory connection exposing atesseraview.
§Plans
The free tier covers every coin and all three datasets over the trailing
30 days, served at month granularity (the current and previous calendar
month). Closed history is sold as one-off bundles; TesseraClient::datasets
and TesseraClient::partitions already reflect your entitlement, so the
client needs no plan logic of its own.
§Errors
Every failure raises TesseraError, mirroring the Python exception
taxonomy (Configuration, NotFound, PresignExpired, …).
§Example
let client = tessera::TesseraClient::new(None)?;
// Pick the newest available month rather than a hardcoded one:
// partitions roll on a trailing 30-day window, so fixed dates go stale.
let latest = client
.partitions("gold_ohlcv_1m", Some("BTC"), None)?
.partitions
.pop()
.expect("at least one partition");
let frame = client.read("gold_ohlcv_1m", "BTC", &latest.month, None)?;
println!("{} rows for {}", frame.height(), latest.month);Modules§
- readers
- Data-engine plumbing: Parquet readers for Polars and DuckDB.
- resolver
- Concurrent presigned-URL resolution.
Structs§
- Async
Tessera Client - An async client for the Tessera API.
- Client
Config - Resolved configuration shared by the sync and async clients.
- Dataset
Summary - DatasetSummary.
- Datasets
Response - DatasetsResponse.
- DayDownload
- One day object of a day-backed partition: where to fetch it and until when.
- DayDownload
Response - The shape a day-backed partition’s download returns: one presigned URL per day object, because the open month is a set of day objects rather than one parquet.
- Download
Response - DownloadResponse.
- Error
Body - The error response body. Every error variant serialises to this shape —
a single machine-readable
errorcode, and nothing else. Declared as a real struct (rather than the inlinejson!below) only so it can be referenced as a responsebodyin the OpenAPI spec;into_responsestill emits the same JSON. - Month
Range - MonthRange.
- Month
Span - An inclusive range of months, e.g.
MonthSpan::new("2025-01", "2025-09")?. - Partition
- Partition.
- Partition
Ref - A fully-qualified reference to a single partition.
- Partitions
Response - PartitionsResponse.
- Tessera
Client - A synchronous client for the Tessera API.
Enums§
- Download
Body - The 200 body of a download route, whichever shape the partition has.
- Tessera
Error - Every error raised by this crate.
Constants§
- API_
KEY_ ENV_ VAR - Environment variable consulted when no explicit API key is passed.
- DEFAULT_
BASE_ URL - Production API base URL.
- USER_
AGENT - Default
User-Agentfor requests made by this client. - VERSION
- The crate version, as published on crates.io.
Traits§
- Into
Coins - Accepted shapes for a
coinargument: one symbol or any iterable of them. - Into
Months - Accepted shapes for a
monthargument: one month, aMonthSpan, or any iterable of months.
Functions§
- download_
urls - Flatten a download body into presigned URLs, oldest object first.
- error_
from_ response - Build the appropriate
TesseraErrorfrom an error response.