pub struct QuoteTick {
pub symbol: String,
pub price: f64,
pub change: Option<f64>,
pub regular: bool,
}Expand description
Every shape at the root as well, because a window names a view on nearly
every line and arvo_api::research::StudyView would be noise. The names
do not collide: proto has no overloading and neither does this.
Every shape at the root as well, because a window names a view on nearly
every line and arvo_api::research::StudyView would be noise. The names
do not collide: proto has no overloading and neither does this.
Every shape at the root as well, because a window names a view on nearly
every line and arvo_api::research::StudyView would be noise. The names
do not collide: proto has no overloading and neither does this.
One trade off the live price stream.
Typed rather than a View: there are hundreds a minute, and the four fields are the whole of it. Display only — a tick never becomes a bar, because the data library is fetched files with a content hash and that hash is what makes a stored verdict checkable. One price, as it arrived.
Separate from QuoteView and deliberately thinner: a tick carries only
what moved. Which rows exist, and which of them you hold, is settled once
by the Watchlist call — a stream that also decided the row set would make
a socket blip look like a portfolio change.
regular is not decoration. Outside 09:30–16:00 the stream keeps sending,
on thin volume and wide spreads, and a pre-market print rendered
identically to a regular-session one is a worse answer than no price at
all. A front end marks it; it does not hide it.
Fields§
§symbol: StringThe bare ticker, matching QuoteView.symbol.
price: f64§change: Option<f64>Move since the previous close, as a fraction.
regular: boolWhether this print happened in the regular session.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QuoteTick
impl<'de> Deserialize<'de> for QuoteTick
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for QuoteTick
impl Message for QuoteTick
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.