Struct tinkoff_invest_types::Operation
source · pub struct Operation {Show 17 fields
pub id: String,
pub parent_operation_id: String,
pub currency: String,
pub payment: Option<MoneyValue>,
pub price: Option<MoneyValue>,
pub state: i32,
pub quantity: i64,
pub quantity_rest: i64,
pub figi: String,
pub instrument_type: String,
pub date: Option<Timestamp>,
pub type: String,
pub operation_type: i32,
pub trades: Vec<OperationTrade>,
pub asset_uid: String,
pub position_uid: String,
pub instrument_uid: String,
}
Expand description
Данные по операции.
Fields§
§id: String
Идентификатор операции.
parent_operation_id: String
Идентификатор родительской операции.
currency: String
Валюта операции.
payment: Option<MoneyValue>
Сумма операции.
price: Option<MoneyValue>
Цена операции за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
state: i32
Статус операции.
quantity: i64
Количество единиц инструмента.
quantity_rest: i64
Неисполненный остаток по сделке.
figi: String
Figi-идентификатор инструмента, связанного с операцией.
instrument_type: String
Тип инструмента. Возможные значения: bond — облигация; share — акция; currency — валюта; etf — фонд; futures — фьючерс.
date: Option<Timestamp>
Дата и время операции в формате часовом поясе UTC.
type: String
Текстовое описание типа операции.
operation_type: i32
Тип операции.
trades: Vec<OperationTrade>
Массив сделок.
asset_uid: String
Идентификатор актива
position_uid: String
position_uid-идентификатора инструмента.
instrument_uid: String
Уникальный идентификатор инструмента.
Implementations§
source§impl Operation
impl Operation
sourcepub fn state(&self) -> OperationState
pub fn state(&self) -> OperationState
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
sourcepub fn set_state(&mut self, value: OperationState)
pub fn set_state(&mut self, value: OperationState)
Sets state
to the provided enum value.
sourcepub fn operation_type(&self) -> OperationType
pub fn operation_type(&self) -> OperationType
Returns the enum value of operation_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_operation_type(&mut self, value: OperationType)
pub fn set_operation_type(&mut self, value: OperationType)
Sets operation_type
to the provided enum value.
Trait Implementations§
source§impl Message for Operation
impl Message for Operation
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.source§impl PartialEq for Operation
impl PartialEq for Operation
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
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> 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