pub struct FetchView {
pub instrument: String,
pub source: String,
pub interval: String,
pub bars: u32,
pub interpolated: u32,
pub from: Option<String>,
pub to: Option<String>,
pub data_findings: Vec<DataFindingView>,
pub revision: Option<String>,
pub revised: bool,
pub dividends: Option<u32>,
}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.
What a fetch pulled in.
Fields§
§instrument: String§source: StringWhich source answered. Part of the result rather than assumed, now that it is a choice: two vendors’ copies of one ticker are two datasets.
interval: String§bars: u32§interpolated: u32Gap-fill bars the server synthesised, which were dropped. Surfaced rather than hidden: a series that is a quarter invented is one to know about before drawing a conclusion from it.
from: Option<String>§to: Option<String>§data_findings: Vec<DataFindingView>§revision: Option<String>What changed against the copy already held, when there was one.
A re-fetch that rewrites history stales every finding on the instrument, correctly, via the content hash. This says why it changed — a re-adjustment after a corporate action leaves the underlying facts intact, a revision does not, and the two want different responses.
revised: boolTrue only when the change was a genuine disagreement about prices, rather than a rescaling or extra coverage.
dividends: Option<u32>Cash distributions stored alongside the bars.
None means the source does not serve dividends at all, which is a
different fact from Some(0) — it looked, and the instrument paid none.
Collapsing the two would report “no dividends” for an instrument that
pays them, which is the direction the platform’s excess-return bias
already leans.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FetchView
impl<'de> Deserialize<'de> for FetchView
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 FetchView
impl Message for FetchView
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.