pub struct TickRsp {
pub security_id: Option<u64>,
pub result: Option<i32>,
pub price_last_close: Option<u64>,
pub date_time_s: Option<u32>,
pub next_ticker_key: Option<u64>,
pub ticker_num: Option<u32>,
pub items: Vec<TickItem>,
pub tick_period_type: Option<u32>,
pub tick_volume_precision: Option<i32>,
pub tick_period_type_ex: Vec<u32>,
pub broker_id: Option<i32>,
}Expand description
拉取协议 - 回包
Fields§
§security_id: Option<u64>股票ID
result: Option<i32>结果,result=0时,才有后续字段。
price_last_close: Option<u64>用于判断涨跌色的基准价格[放大10^9倍],对盘中逐笔表示昨收,对盘前盘后逐笔表示计算盘前、盘后涨跌幅的基础价格
date_time_s: Option<u32>交易日时间戳,秒
next_ticker_key: Option<u64>== 0 表示拉完了
ticker_num: Option<u32>笔数
items: Vec<TickItem>逐笔项数组, 第一个数据点是本数组中的最新数据
tick_period_type: Option<u32>逐笔所在的时段,见TickPeriodType枚举
tick_volume_precision: Option<i32>逐笔数量精度n, 对TickItem中volume放大了10^n次方
tick_period_type_ex: Vec<u32>请求拉取的逐笔类型,请求成功则原样返回 tick_period_type_ex
broker_id: Option<i32>v1.4.110 final E.5 LOW: 补 field 11 对齐 C++ NNProtoFile/Server/PB/Quote/FTCmdTick.proto:68. Rust handler 暂无 caller 但 proto 不留漂移 (per pitfall #23 防第 4 次复发).
券商id,只数字货币有效,同请求的broker_id
Implementations§
Source§impl TickRsp
impl TickRsp
Sourcepub fn security_id(&self) -> u64
pub fn security_id(&self) -> u64
Returns the value of security_id, or the default value if security_id is unset.
Sourcepub fn result(&self) -> i32
pub fn result(&self) -> i32
Returns the value of result, or the default value if result is unset.
Sourcepub fn price_last_close(&self) -> u64
pub fn price_last_close(&self) -> u64
Returns the value of price_last_close, or the default value if price_last_close is unset.
Sourcepub fn date_time_s(&self) -> u32
pub fn date_time_s(&self) -> u32
Returns the value of date_time_s, or the default value if date_time_s is unset.
Sourcepub fn next_ticker_key(&self) -> u64
pub fn next_ticker_key(&self) -> u64
Returns the value of next_ticker_key, or the default value if next_ticker_key is unset.
Sourcepub fn ticker_num(&self) -> u32
pub fn ticker_num(&self) -> u32
Returns the value of ticker_num, or the default value if ticker_num is unset.
Sourcepub fn tick_period_type(&self) -> u32
pub fn tick_period_type(&self) -> u32
Returns the value of tick_period_type, or the default value if tick_period_type is unset.
Sourcepub fn tick_volume_precision(&self) -> i32
pub fn tick_volume_precision(&self) -> i32
Returns the value of tick_volume_precision, or the default value if tick_volume_precision is unset.
Trait Implementations§
Source§impl Message for TickRsp
impl Message for TickRsp
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.