Expand description
API definitions and related utilities.
§Observability
Two independent, additive, opt-in hooks:
tracingfeature — instrumentsClient::get/ [sync::Client::get] with a span (method,endpoint,attempt,status) and debug events on each retry (backoff delay, transient status/error). Off by default and compiles away entirely (notracingdependency pulled in) when disabled. The API key is never recorded —Client’sDebugimpl already redacts it, and no span/event field ever carries it.- Custom HTTP client —
ClientBuilder::http_client/ [sync::ClientBuilder::http_client] let callers supply their own pre-builtreqwest::Client, e.g. wrapped withreqwest-middlewarefor custom auth, metrics, or logging middleware. When omitted, the client falls back to the built-in defaults (User-Agent, unbounded idle pool, the configured timeout).
§Pagination
Client::paginate / [sync::Client::paginate] auto-paginate any
[Paginated] response envelope, whether or not it reports a total (see
[Paginated::total]). The async [Paginator] is a plain next_page()
cursor by default; enabling the opt-in stream feature additionally
implements
Stream
for it, so it composes with futures/StreamExt combinators and
.next().await. Off by default and compiles away entirely (no
futures-core dependency pulled in) when disabled. The blocking
[sync::Paginator] already implements Iterator unconditionally.
Structs§
- Client
- The async client for interacting with the Datamaxi+ API.
- Client
Builder - Builder for a
Client, giving control over the API key source, base URL, and request timeout. - Paginator
- Async auto-paginator returned by
Client::paginate.
Enums§
- Error
- Errors returned by the Datamaxi+ API client.
Traits§
- Paginated
- Implemented by paged response envelopes — the
page/limit/datashape shared by several Datamaxi+ endpoints, with or without atotal(e.g.CexAnnouncementsResponsereportstotal;FundingRateHistoryResponsedoes not) — soClient::paginate/ [sync::Client::paginate] can drive a generic auto-paginator over them without codegen needing to emit a bespoke helper per endpoint.