pub struct LimitsData {
pub depo_limit: Option<Vec<DepoLimitEntry>>,
pub future_holding: Option<Vec<FutureHoldingEntry>>,
pub money_limits: Option<Vec<MoneyLimitEntry>>,
pub futures_limits: Option<Vec<FuturesLimitEntry>>,
}Expand description
A limits frame: one object with the current limits of the account.
The four lists are optional, because the broker may leave out a list that is empty.
§Examples
use brokapi_bcs_protocol::ws::models::LimitsData;
let l: LimitsData = serde_json::from_str(
r#"{"moneyLimits":[{"currencyCode":"RUB","locked":10.0,"quantity":{"type":"T0","value":500.0}}]}"#,
)?;
assert!(l.depo_limit.is_none());
assert_eq!(l.money_limits.unwrap()[0].quantity.as_ref().unwrap().value, dec!(500.0));Fields§
§depo_limit: Option<Vec<DepoLimitEntry>>Securities positions.
future_holding: Option<Vec<FutureHoldingEntry>>Futures positions.
money_limits: Option<Vec<MoneyLimitEntry>>Money balances.
futures_limits: Option<Vec<FuturesLimitEntry>>Limits of the derivatives market.
Trait Implementations§
Source§impl Clone for LimitsData
impl Clone for LimitsData
Source§fn clone(&self) -> LimitsData
fn clone(&self) -> LimitsData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LimitsData
impl Debug for LimitsData
Source§impl<'de> Deserialize<'de> for LimitsData
impl<'de> Deserialize<'de> for LimitsData
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LimitsData
impl RefUnwindSafe for LimitsData
impl Send for LimitsData
impl Sync for LimitsData
impl Unpin for LimitsData
impl UnsafeUnpin for LimitsData
impl UnwindSafe for LimitsData
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
Mutably borrows from an owned value. Read more