Struct tinkoff_invest_types::OrderBook
source · pub struct OrderBook {
pub figi: String,
pub depth: i32,
pub is_consistent: bool,
pub bids: Vec<Order>,
pub asks: Vec<Order>,
pub time: Option<Timestamp>,
pub limit_up: Option<Quotation>,
pub limit_down: Option<Quotation>,
pub instrument_uid: String,
pub order_book_type: i32,
}
Expand description
Пакет стаканов в рамках стрима.
Fields§
§figi: String
FIGI-идентификатор инструмента.
depth: i32
Глубина стакана.
is_consistent: bool
Флаг консистентности стакана. false — не все заявки попали в стакан из-за сетевых задержек или нарушения порядка доставки.
bids: Vec<Order>
Массив предложений.
asks: Vec<Order>
Массив спроса.
time: Option<Timestamp>
Время формирования стакана в часовом поясе UTC по времени биржи.
limit_up: Option<Quotation>
Верхний лимит цены за 1 инструмент. Чтобы получить стоимость лота, нужно умножить на лотность инструмента. Подробнее про перевод цен в валюту.
limit_down: Option<Quotation>
Нижний лимит цены за 1 инструмент. Чтобы получить стоимость лота, нужно умножить на лотность инструмента. Подробнее про перевод цен в валюту.
instrument_uid: String
UID инструмента.
order_book_type: i32
Тип стакана.
Implementations§
source§impl OrderBook
impl OrderBook
sourcepub fn order_book_type(&self) -> OrderBookType
pub fn order_book_type(&self) -> OrderBookType
Returns the enum value of order_book_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_order_book_type(&mut self, value: OrderBookType)
pub fn set_order_book_type(&mut self, value: OrderBookType)
Sets order_book_type
to the provided enum value.
Trait Implementations§
source§impl Message for OrderBook
impl Message for OrderBook
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
.impl StructuralPartialEq for OrderBook
Auto Trait Implementations§
impl Freeze for OrderBook
impl RefUnwindSafe for OrderBook
impl Send for OrderBook
impl Sync for OrderBook
impl Unpin for OrderBook
impl UnwindSafe for OrderBook
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request