Struct tinkoff_invest_types::PostOrderRequest
source · pub struct PostOrderRequest {
pub figi: Option<String>,
pub quantity: i64,
pub price: Option<Quotation>,
pub direction: i32,
pub account_id: String,
pub order_type: i32,
pub order_id: String,
pub instrument_id: String,
pub time_in_force: i32,
pub price_type: i32,
}
Expand description
Запрос выставления торгового поручения.
Fields§
§figi: Option<String>
Deprecated Figi-идентификатор инструмента. Необходимо использовать instrument_id.
quantity: i64
Количество лотов.
price: Option<Quotation>
Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента. Игнорируется для рыночных поручений.
direction: i32
Направление операции.
account_id: String
Номер счёта.
order_type: i32
Тип заявки.
order_id: String
Идентификатор запроса выставления поручения для целей идемпотентности в формате UID. Максимальная длина 36 символов.
instrument_id: String
Идентификатор инструмента, принимает значения Figi или Instrument_uid.
time_in_force: i32
Алгоритм исполнения поручения, применяется только к лимитной заявке.
price_type: i32
Тип цены.
Implementations§
source§impl PostOrderRequest
impl PostOrderRequest
sourcepub fn direction(&self) -> OrderDirection
pub fn direction(&self) -> OrderDirection
Returns the enum value of direction
, or the default if the field is set to an invalid enum value.
sourcepub fn set_direction(&mut self, value: OrderDirection)
pub fn set_direction(&mut self, value: OrderDirection)
Sets direction
to the provided enum value.
sourcepub fn order_type(&self) -> OrderType
pub fn order_type(&self) -> OrderType
Returns the enum value of order_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_order_type(&mut self, value: OrderType)
pub fn set_order_type(&mut self, value: OrderType)
Sets order_type
to the provided enum value.
sourcepub fn time_in_force(&self) -> TimeInForceType
pub fn time_in_force(&self) -> TimeInForceType
Returns the enum value of time_in_force
, or the default if the field is set to an invalid enum value.
sourcepub fn set_time_in_force(&mut self, value: TimeInForceType)
pub fn set_time_in_force(&mut self, value: TimeInForceType)
Sets time_in_force
to the provided enum value.
sourcepub fn price_type(&self) -> PriceType
pub fn price_type(&self) -> PriceType
Returns the enum value of price_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_price_type(&mut self, value: PriceType)
pub fn set_price_type(&mut self, value: PriceType)
Sets price_type
to the provided enum value.
Trait Implementations§
source§impl Clone for PostOrderRequest
impl Clone for PostOrderRequest
source§fn clone(&self) -> PostOrderRequest
fn clone(&self) -> PostOrderRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PostOrderRequest
impl Debug for PostOrderRequest
source§impl Default for PostOrderRequest
impl Default for PostOrderRequest
source§impl Message for PostOrderRequest
impl Message for PostOrderRequest
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 PostOrderRequest
impl PartialEq for PostOrderRequest
source§fn eq(&self, other: &PostOrderRequest) -> bool
fn eq(&self, other: &PostOrderRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PostOrderRequest
Auto Trait Implementations§
impl Freeze for PostOrderRequest
impl RefUnwindSafe for PostOrderRequest
impl Send for PostOrderRequest
impl Sync for PostOrderRequest
impl Unpin for PostOrderRequest
impl UnwindSafe for PostOrderRequest
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