pub enum Frame {
Show 36 variants
Pong,
Ack(Ack),
Error(Refusal),
Post(Reply),
AllMids(Mids),
Book(Book),
Trades(Vec<Trade>),
Bbo(Bbo),
Candle(Candle),
AssetCtx {
coin: String,
ctx: PerpCtx,
},
SpotAssetCtx {
coin: String,
ctx: SpotCtx,
},
AssetData(ActiveAssetData),
UserFills(UserFills),
OrderUpdates(Vec<OrderUpdate>),
UserEvent(UserEvent),
UserFundings(UserFundings),
Ledger(Ledger),
ClearinghouseState(DexState),
AllDexsClearinghouseState(AllDexsState),
OpenOrders(OpenOrders),
SpotState(SpotState),
TwapStates(TwapStates),
TwapSliceFills(TwapSliceFills),
TwapHistory(TwapHistory),
Notification(String),
WebData3(WebData3),
AllDexsAssetCtxs(Vec<(String, Vec<PerpCtx>)>),
AssetCtxs {
dex: String,
ctxs: Vec<PerpCtx>,
},
SpotAssetCtxs(Vec<SpotCtx>),
OutcomeMetaUpdates(Json),
FastAssetCtxs(String),
HistoricalOrders(HistoricalOrders),
L2(L2),
Pac(String),
Sac(String),
Other {
channel: String,
data: String,
},
}Expand description
One frame, by channel.
Variants§
Pong
pong: the answer to a ping.
Ack(Ack)
subscriptionResponse: the venue took a subscribe or an unsubscribe.
Error(Refusal)
error: the venue refused something sent, in its own words.
Post(Reply)
post: the answer to a post, by its id.
AllMids(Mids)
allMids: every coin’s mid on one perp dex.
Book(Book)
l2Book.
Trades(Vec<Trade>)
trades: new prints on one coin.
Bbo(Bbo)
bbo: the best bid and offer of one coin.
Candle(Candle)
candle: one candle, sent as it changes.
AssetCtx
activeAssetCtx: a perp’s context.
SpotAssetCtx
activeSpotAssetCtx: what activeAssetCtx sends for a spot pair or an outcome side.
Fields
AssetData(ActiveAssetData)
activeAssetData.
UserFills(UserFills)
userFills: the account’s fills.
OrderUpdates(Vec<OrderUpdate>)
orderUpdates: status changes of the account’s orders.
UserEvent(UserEvent)
user: what userEvents sends.
UserFundings(UserFundings)
userFundings: the account’s funding payments.
Ledger(Ledger)
userNonFundingLedgerUpdates.
ClearinghouseState(DexState)
clearinghouseState: the account’s clearinghouse on one dex.
AllDexsClearinghouseState(AllDexsState)
allDexsClearinghouseState: the account’s clearinghouse on every dex.
OpenOrders(OpenOrders)
openOrders: the account’s resting orders on one dex.
SpotState(SpotState)
spotState: the account’s spot balances.
TwapStates(TwapStates)
twapStates: the account’s running TWAPs on one dex.
TwapSliceFills(TwapSliceFills)
userTwapSliceFills.
TwapHistory(TwapHistory)
userTwapHistory.
Notification(String)
notification: a short text for the account, as sent.
WebData3(WebData3)
webData3: the account as Hyperliquid’s own frontend reads it.
AllDexsAssetCtxs(Vec<(String, Vec<PerpCtx>)>)
Every perp dex’s contexts, by dex name, the first "".
AssetCtxs
assetCtxs: one perp dex’s contexts.
Fields
SpotAssetCtxs(Vec<SpotCtx>)
spotAssetCtxs: every spot pair’s and outcome side’s context.
OutcomeMetaUpdates(Json)
What changed in outcomeMeta, kept as sent: [{"outcomeSettled":23205}]. Its arrival
is the news; read outcomeMeta again for the whole.
FastAssetCtxs(String)
fastAssetCtxs: base64 of raw DEFLATE (RFC 1951) over JSON, kept as sent. Inflating it
needs a decompressor this crate does not carry.
HistoricalOrders(HistoricalOrders)
userHistoricalOrders.
L2(L2)
l2: the book’s snapshot, or a diff to it.
Pac(String)
pac: every perp dex’s contexts as [dex, ctxs] pairs, the first dex "", each ctxs in
the dex’s universe order. After the snapshot, a context holds only the fields that changed,
or is {}. Base64 of raw DEFLATE (RFC 1951) over JSON, kept as sent.
Sac(String)
sac: every spot pair’s and outcome side’s context by coin; after the snapshot, only the
coins and fields that changed. Base64 of raw DEFLATE (RFC 1951) over JSON, kept as sent.
Other
A channel this build does not read: its name, and its data as written (empty when the frame has none).
Trait Implementations§
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Forget for Frame
impl Freeze for Frame
impl Move for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.