finam 0.3.0

SDK для работы с API Финам
Documentation
// This file is @generated by prost-build.
/// Сторона сделки
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Side {
    /// Сторона сделки не указана
    Unspecified = 0,
    /// Покупка
    Buy = 1,
    /// Продажа
    Sell = 2,
}
impl Side {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "SIDE_UNSPECIFIED",
            Self::Buy => "SIDE_BUY",
            Self::Sell => "SIDE_SELL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SIDE_UNSPECIFIED" => Some(Self::Unspecified),
            "SIDE_BUY" => Some(Self::Buy),
            "SIDE_SELL" => Some(Self::Sell),
            _ => None,
        }
    }
}
/// Информация о сделке
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountTrade {
    /// Идентификатор сделки
    #[prost(string, tag = "1")]
    pub trade_id: ::prost::alloc::string::String,
    /// Символ инструмента
    #[prost(string, tag = "2")]
    pub symbol: ::prost::alloc::string::String,
    /// Цена исполнения
    #[prost(message, optional, tag = "3")]
    pub price: ::core::option::Option<super::super::super::google::r#type::Decimal>,
    /// Размер в шт.
    #[prost(message, optional, tag = "4")]
    pub size: ::core::option::Option<super::super::super::google::r#type::Decimal>,
    /// Сторона сделки (long или short)
    #[prost(enumeration = "Side", tag = "5")]
    pub side: i32,
    /// Метка времени
    #[prost(message, optional, tag = "6")]
    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
    /// Идентификатор заявки
    #[prost(string, tag = "7")]
    pub order_id: ::prost::alloc::string::String,
}