pub struct OpenInterest {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl OpenInterest
impl OpenInterest
Sourcepub fn get(
&self,
exchange: impl Into<String>,
symbol: impl Into<String>,
) -> Result<Value>
pub fn get( &self, exchange: impl Into<String>, symbol: impl Into<String>, ) -> Result<Value>
Fetch the most recent Open Interest snapshot for a futures symbol on a given exchange.
Sourcepub fn history_aggregated(
&self,
token_id: impl Into<String>,
options: OpenInterestHistoryAggregatedOptions,
) -> Result<Value>
pub fn history_aggregated( &self, token_id: impl Into<String>, options: OpenInterestHistoryAggregatedOptions, ) -> Result<Value>
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 fn list(&self, options: OpenInterestListOptions) -> Result<Value>
pub fn list(&self, options: OpenInterestListOptions) -> Result<Value>
Fetch latest Open Interest snapshots across exchanges/symbols. Optionally filter by exchange. Results are sorted by openInterestUsd descending (null values last).
Sourcepub fn overview(&self, options: OpenInterestOverviewOptions) -> Result<Value>
pub fn overview(&self, options: OpenInterestOverviewOptions) -> Result<Value>
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 fn summary(&self, options: OpenInterestSummaryOptions) -> Result<Value>
pub fn summary(&self, options: OpenInterestSummaryOptions) -> Result<Value>
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more