pub struct OpenInterest { /* private fields */ }Implementations§
Source§impl OpenInterest
impl OpenInterest
Sourcepub fn from_client(client: Client) -> Self
pub fn from_client(client: Client) -> Self
Wraps an already-built client (e.g. from ClientBuilder).
Sourcepub async fn get(
&self,
exchange: impl Into<String>,
symbol: impl Into<String>,
) -> Result<OpenInterestResponse>
pub async fn get( &self, exchange: impl Into<String>, symbol: impl Into<String>, ) -> Result<OpenInterestResponse>
Fetch the most recent Open Interest snapshot for a futures symbol on a given exchange.
Sourcepub async fn history_aggregated(
&self,
token_id: impl Into<String>,
options: OpenInterestHistoryAggregatedOptions,
) -> Result<OpenInterestHistoryAggregatedResponse>
pub async fn history_aggregated( &self, token_id: impl Into<String>, options: OpenInterestHistoryAggregatedOptions, ) -> Result<OpenInterestHistoryAggregatedResponse>
Historical Open Interest time series for a single token, broken down per exchange and aggregated to a fixed bucket (avg within bucket). The default lookback depends on the requested interval — 7 days for 1h, 30 days for 4h, 1 year for 1d — so callers don’t have to hand-tune from/to for typical queries. The response also includes token metadata (icon, symbol, name) so a single call paints the whole header strip.
Sourcepub async fn list(
&self,
options: OpenInterestListOptions,
) -> Result<OpenInterestListResponse>
pub async fn list( &self, options: OpenInterestListOptions, ) -> Result<OpenInterestListResponse>
Fetch latest Open Interest snapshots across exchanges/symbols. Optionally filter by exchange. Results are sorted by openInterestUsd descending (null values last).
Sourcepub async fn overview(
&self,
options: OpenInterestOverviewOptions,
) -> Result<OpenInterestOverviewResponse>
pub async fn overview( &self, options: OpenInterestOverviewOptions, ) -> Result<OpenInterestOverviewResponse>
Paginated token × exchange Open Interest matrix. For each base asset we list the per-exchange notional OI in USD (when a venue carries the token) and null when it doesn’t trade there. The matrix is sortable by any exchange column and searchable by base symbol — same shape the DataMaxi+ dashboard uses on /open-interest. Cached snapshot rebuilds every few seconds, so back-to-back requests are cheap.
Sourcepub async fn summary(
&self,
options: OpenInterestSummaryOptions,
) -> Result<OpenInterestSummaryResponse>
pub async fn summary( &self, options: OpenInterestSummaryOptions, ) -> Result<OpenInterestSummaryResponse>
Top-line aggregates over the current Open Interest snapshot — total OI USD, top tokens by OI, top exchanges by OI, and the count of venues currently reporting any base. Powers the OI page’s KPI strip and breakdown card without forcing the caller to fetch the full token list.
Trait Implementations§
Source§impl Clone for OpenInterest
impl Clone for OpenInterest
Source§fn clone(&self) -> OpenInterest
fn clone(&self) -> OpenInterest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more