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.
§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 12-month 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.
- Download
Response - DownloadResponse.
- Error
Body - The error response body. Every error variant serialises to this shape —
a single machine-readable
errorcode. 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§
- 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§
- error_
from_ response - Build the appropriate
TesseraErrorfrom an error response.