pub enum NotificationPayload {
Order(Box<LiveOrderRecord>),
AccountBalance(Box<Balance>),
CurrentPosition(Box<BriefPosition>),
QuoteAlert(Box<QuoteAlert>),
PublicWatchlist(Box<Watchlist>),
Unsupported(RawPayload),
}Expand description
The account payload a notification carries.
One variant per notification the four documented actions produce, plus one
for everything else. Unsupported is not a failure: it means the frame
arrived, its type is known to exist, and no captured frame has
established the schema — so the payload is kept rather than discarded, and
the caller can look at it.
Variants§
Order(Box<LiveOrderRecord>)
A full order object, published on every status change.
The only place an executed price reaches a caller of this crate: fills
live inside legs and no REST endpoint returns them.
AccountBalance(Box<Balance>)
A full account balance.
CurrentPosition(Box<BriefPosition>)
One position, as it now stands.
QuoteAlert(Box<QuoteAlert>)
A quote alert the customer configured, and the venue fired.
PublicWatchlist(Box<Watchlist>)
One of tastytrade’s curated watchlists, as it now stands.
Unsupported(RawPayload)
A notification whose type this crate recognises but does not model,
or one whose payload did not decode.
Both cases keep the payload. Discarding it was the old behaviour and it is the one thing a caller cannot recover from.