pub struct C2s {
pub security: Security,
pub kline_source: Option<i32>,
pub pre_side: Option<i32>,
pub kl_type: i32,
pub begin_time: String,
pub end_time: String,
pub max_ack_kl_num: Option<i32>,
pub next_req_key: Option<Vec<u8>>,
}Expand description
事件合约历史K线拉取 与通用 Qot_RequestHistoryKL 的差异:入参多 klineSource/preSide 方向字段,回包结构为 ECKLine(6字段) + KlineItem.pre_side KLType 仅支持 1Min/60Min/Day
Fields§
§security: Security合约标的(contract_id 或 sub_contract_id)
kline_source: Option<i32>K线来源(None/OrderBookYes);不填当 None(合约级K线),优先级高于 preSide,与实时EC对齐
pre_side: Option<i32>方向(Yes/No);klineSource=None 且入参为合约级标的时生效,默认 Yes
kl_type: i32通用K线类型,EC仅支持 1Min/60Min/Day
begin_time: String开始时间字符串
end_time: String结束时间字符串
max_ack_kl_num: Option<i32>最多返回K线根数,如果未指定表示不限制
next_req_key: Option<Vec<u8>>分页请求key
Implementations§
Source§impl C2s
impl C2s
Sourcepub fn kline_source(&self) -> EcKlineSource
pub fn kline_source(&self) -> EcKlineSource
Returns the enum value of kline_source, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_kline_source(&mut self, value: EcKlineSource)
pub fn set_kline_source(&mut self, value: EcKlineSource)
Sets kline_source to the provided enum value.
Sourcepub fn pre_side(&self) -> PredSide
pub fn pre_side(&self) -> PredSide
Returns the enum value of pre_side, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_pre_side(&mut self, value: PredSide)
pub fn set_pre_side(&mut self, value: PredSide)
Sets pre_side to the provided enum value.
Sourcepub fn kl_type(&self) -> KlType
pub fn kl_type(&self) -> KlType
Returns the enum value of kl_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_kl_type(&mut self, value: KlType)
pub fn set_kl_type(&mut self, value: KlType)
Sets kl_type to the provided enum value.
Sourcepub fn max_ack_kl_num(&self) -> i32
pub fn max_ack_kl_num(&self) -> i32
Returns the value of max_ack_kl_num, or the default value if max_ack_kl_num is unset.
Sourcepub fn next_req_key(&self) -> &[u8] ⓘ
pub fn next_req_key(&self) -> &[u8] ⓘ
Returns the value of next_req_key, or the default value if next_req_key is unset.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for C2s
impl<'de> Deserialize<'de> for C2s
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>,
impl Eq for C2s
Source§impl Message for C2s
impl Message for C2s
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.