Skip to main content
The official Rust client is async-first and built on Tokio. The crate is published as ticksupply; rustdoc is hosted on docs.rs.

crates.io

Releases

docs.rs

API reference (rustdoc)

GitHub

Source & changelog

Install

Or via the CLI:

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 cloneClient wraps an Arc, shares a connection pool, and is Send + Sync
  • Automatic retries — exponential backoff on transient errors and 5xx responses
  • Auto-pagination.stream() returns a Tokio Stream that walks every page
  • Typed errors — match on Error::NotFound, Error::RateLimited, etc.; every variant carries the request_id from X-Request-Id
  • Configurable transport — override timeout, retry count, base URL, or inject your own reqwest::Client for proxies / telemetry
  • Optional types — Cargo features for chrono (default), time, and rust_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).
Request builders that take a timestamp accept anything that implements IntoTimestampi64, &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:
Enable additional features as needed:

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
  • rustls for TLS (no system OpenSSL dependency)
See the Rust examples page for complete usage examples, docs.rs/ticksupply for the rustdoc API reference, and the examples/ directory in the repo for runnable programs.
Last modified on April 27, 2026