ticksupply; rustdoc is hosted on docs.rs.
crates.io
Releases
docs.rs
API reference (rustdoc)
GitHub
Source & changelog
Install
Quick example
Features
- Async-first — every call returns a
Future; pairs with any Tokio runtime - Builder pattern — typed builders for every mutating endpoint with
.send().await? - Cheap to clone —
Clientwraps anArc, shares a connection pool, and isSend + Sync - Automatic retries — exponential backoff on transient errors and 5xx responses
- Auto-pagination —
.stream()returns a TokioStreamthat walks every page - Typed errors — match on
Error::NotFound,Error::RateLimited, etc.; every variant carries therequest_idfromX-Request-Id - Configurable transport — override timeout, retry count, base URL, or inject your own
reqwest::Clientfor proxies / telemetry - Optional types — Cargo features for
chrono(default),time, andrust_decimal - Fully documented —
#![warn(missing_docs)]is enforced; every public item has rustdoc on docs.rs
Configuration
Client::new() reads TICKSUPPLY_API_KEY from the environment. For more control, use the builder:
Wire types
The API uses string-encoded primitives to preserve precision across implementations. The crate exposes them as small wrapper types that hold the raw wire form losslessly and convert on demand:Nanos carries market-data timestamps (preserves nanosecond precision — f64 would silently round). Timestamp carries control-plane timestamps (creation times, activity spans) and round-trips any RFC 3339 variant the server sends. Decimal carries amounts where float precision matters (currently BillingUsage::export_gb_total).
IntoTimestamp — i64, &str, String, Nanos, plus chrono::DateTime<Utc> (default feature) or time::OffsetDateTime (under time). So you can pass whatever your call site already uses:
Cargo features
Optional types are gated behind Cargo features so you only pay for what you use:
Disable defaults if you only want raw
i64 nanoseconds (Nanos) and string timestamps:
Versioning & releases
The crate follows SemVer. Pin to a minor range ("0.2") to receive bug fixes; major bumps (0.3, 1.0) may include breaking API changes documented in CHANGELOG.md. Every published version has its own rustdoc snapshot at https://docs.rs/ticksupply/<version>.
Requirements
- Rust 1.75 or newer (edition 2021)
- A Tokio-compatible async runtime
rustlsfor TLS (no system OpenSSL dependency)