pub enum Event {
Show 34 variants
Trade {
exchange: ExchangeId,
symbol: String,
point: TradePoint,
},
AggTrade {
exchange: ExchangeId,
symbol: String,
point: AggTradePoint,
},
Bar {
exchange: ExchangeId,
symbol: String,
timeframe: KlineInterval,
point: BarPoint,
},
Ticker {
exchange: ExchangeId,
symbol: String,
point: TickerPoint,
},
OrderbookSnapshot {
exchange: ExchangeId,
symbol: String,
point: ObSnapshotPoint,
},
OrderbookDelta {
exchange: ExchangeId,
symbol: String,
point: ObDeltaPoint,
},
MarkPrice {
exchange: ExchangeId,
symbol: String,
point: MarkPricePoint,
},
FundingRate {
exchange: ExchangeId,
symbol: String,
point: FundingRatePoint,
},
OpenInterest {
exchange: ExchangeId,
symbol: String,
point: OpenInterestPoint,
},
Liquidation {
exchange: ExchangeId,
symbol: String,
point: LiquidationPoint,
},
BlockTrade {
exchange: ExchangeId,
symbol: String,
point: BlockTradePoint,
},
IndexPrice {
exchange: ExchangeId,
symbol: String,
point: IndexPricePoint,
},
CompositeIndex {
exchange: ExchangeId,
symbol: String,
point: CompositeIndexPoint,
},
OptionGreeks {
exchange: ExchangeId,
symbol: String,
point: OptionGreeksPoint,
},
VolatilityIndex {
exchange: ExchangeId,
symbol: String,
point: VolatilityIndexPoint,
},
HistoricalVolatility {
exchange: ExchangeId,
symbol: String,
point: HistoricalVolatilityPoint,
},
LongShortRatio {
exchange: ExchangeId,
symbol: String,
point: LongShortRatioPoint,
},
Basis {
exchange: ExchangeId,
symbol: String,
point: BasisPoint,
},
InsuranceFund {
exchange: ExchangeId,
symbol: String,
point: InsuranceFundPoint,
},
OrderbookL3 {
exchange: ExchangeId,
symbol: String,
point: OrderbookL3Point,
},
SettlementEvent {
exchange: ExchangeId,
symbol: String,
point: SettlementEventPoint,
},
MarketWarning {
exchange: ExchangeId,
symbol: String,
point: MarketWarningPoint,
},
RiskLimit {
exchange: ExchangeId,
symbol: String,
point: RiskLimitPoint,
},
PredictedFunding {
exchange: ExchangeId,
symbol: String,
point: PredictedFundingPoint,
},
FundingSettlement {
exchange: ExchangeId,
symbol: String,
point: FundingSettlementPoint,
},
MarkPriceKline {
exchange: ExchangeId,
symbol: String,
timeframe: KlineInterval,
point: MarkPriceKlinePoint,
},
IndexPriceKline {
exchange: ExchangeId,
symbol: String,
timeframe: KlineInterval,
point: IndexPriceKlinePoint,
},
PremiumIndexKline {
exchange: ExchangeId,
symbol: String,
timeframe: KlineInterval,
point: PremiumIndexKlinePoint,
},
Footprint {
exchange: ExchangeId,
symbol: String,
point: FootprintPoint,
},
ConnectorReady {
exchange: ExchangeId,
},
SymbolsLoaded {
exchange: ExchangeId,
account_type: AccountType,
symbols: Vec<SymbolInfo>,
},
OrderUpdate {
exchange: ExchangeId,
account_type: AccountType,
symbol: String,
point: OrderUpdatePoint,
},
BalanceUpdate {
exchange: ExchangeId,
account_type: AccountType,
symbol: String,
point: BalanceUpdatePoint,
},
PositionUpdate {
exchange: ExchangeId,
account_type: AccountType,
symbol: String,
point: PositionUpdatePoint,
},
}Expand description
Events forwarded to consumers. One variant per market-data class.
Variants§
Trade
AggTrade
Bar
Ticker
OrderbookSnapshot
OrderbookDelta
MarkPrice
FundingRate
OpenInterest
Liquidation
BlockTrade
IndexPrice
CompositeIndex
OptionGreeks
VolatilityIndex
HistoricalVolatility
LongShortRatio
Basis
InsuranceFund
OrderbookL3
SettlementEvent
MarketWarning
RiskLimit
PredictedFunding
FundingSettlement
MarkPriceKline
IndexPriceKline
PremiumIndexKline
Footprint
Footprint bar update. Emitted on every trade (open bar, same upsert
semantics as Event::Bar). Kind::Footprint carries the interval.
ConnectorReady
Emitted once when hub.connect_public(exchange) succeeds, or
immediately if it was already connected when warmup() called.
Fields
exchange: ExchangeIdSymbolsLoaded
Emitted once per (exchange, account_type) after REST
get_exchange_info succeeds. Multiple emits per exchange if both
Spot and Futures resolve. symbols is the raw exchange response.
OrderUpdate
Order lifecycle event (create/fill/cancel/expire).
symbol is the instrument symbol from the order, or "" if the
exchange did not include it in this event.
BalanceUpdate
Account balance change event.
symbol is the asset ticker (e.g. "USDT"), not a trading pair.
PositionUpdate
Futures position change event.
symbol is the instrument symbol for the position.