pub enum Ticker {
Linear(LinearTickerData),
Spot(SpotTickerData),
Options(OptionsTicker),
Futures(FuturesTicker),
}Expand description
Enum representing ticker data for different market types.
Encapsulates ticker data for linear perpetuals, spot markets, options, and futures contracts, allowing bots to process market-specific metrics like funding rates, USD index prices, or options Greeks. Bots use this to handle ticker updates in a type-safe manner.
Variants§
Linear(LinearTickerData)
Ticker data for linear perpetual futures.
Contains metrics like funding rate and open interest for USDT-margined contracts. Bots use this for perpetual futures trading strategies.
Spot(SpotTickerData)
Ticker data for spot markets.
Contains metrics like 24-hour volume and USD index price for spot trading pairs. Bots use this for spot market analysis.
Options(OptionsTicker)
Ticker data for options contracts.
Contains metrics like Greeks (delta, gamma, vega, theta), implied volatility, and other options-specific data. Bots use this for options trading strategies.
Futures(FuturesTicker)
Ticker data for futures contracts (including inverse and USDC futures).
Contains metrics for futures contracts with delivery dates. Bots use this for futures trading strategies.
Implementations§
Source§impl Ticker
impl Ticker
Sourcepub fn try_unwrap_linear(self) -> Result<LinearTickerData, TryUnwrapError<Self>>
pub fn try_unwrap_linear(self) -> Result<LinearTickerData, TryUnwrapError<Self>>
Attempts to unwrap this value to the Ticker::Linear variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_spot(self) -> Result<SpotTickerData, TryUnwrapError<Self>>
pub fn try_unwrap_spot(self) -> Result<SpotTickerData, TryUnwrapError<Self>>
Attempts to unwrap this value to the Ticker::Spot variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_options(self) -> Result<OptionsTicker, TryUnwrapError<Self>>
pub fn try_unwrap_options(self) -> Result<OptionsTicker, TryUnwrapError<Self>>
Attempts to unwrap this value to the Ticker::Options variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_futures(self) -> Result<FuturesTicker, TryUnwrapError<Self>>
pub fn try_unwrap_futures(self) -> Result<FuturesTicker, TryUnwrapError<Self>>
Attempts to unwrap this value to the Ticker::Futures variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.