pub struct LimitsResponse {
pub depo_limit: Vec<DepoLimit>,
pub money_limits: Vec<MoneyLimit>,
pub futures_limits: Vec<FuturesLimit>,
}Expand description
The account limits: positions, money and futures limits.
§Examples
use brokapi_bcs_protocol::http::models::LimitsResponse;
let limits: LimitsResponse = serde_json::from_str(
r#"{"moneyLimits":[{"currencyCode":"RUB","locked":10.0,"quantity":{"type":"T0","value":500.0}}]}"#,
)?;
assert!(limits.depo_limit.is_empty()); // a list the broker left out reads as empty
assert_eq!(limits.money_limits[0].currency.as_deref(), Some("RUB"));Fields§
§depo_limit: Vec<DepoLimit>Securities positions, one record per instrument and settlement mode.
money_limits: Vec<MoneyLimit>Money balances, one record per currency and settlement mode.
futures_limits: Vec<FuturesLimit>Limits of the derivatives market.
Trait Implementations§
Source§impl Clone for LimitsResponse
impl Clone for LimitsResponse
Source§fn clone(&self) -> LimitsResponse
fn clone(&self) -> LimitsResponse
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 LimitsResponse
impl Debug for LimitsResponse
Source§impl<'de> Deserialize<'de> for LimitsResponse
impl<'de> Deserialize<'de> for LimitsResponse
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 LimitsResponse
impl RefUnwindSafe for LimitsResponse
impl Send for LimitsResponse
impl Sync for LimitsResponse
impl Unpin for LimitsResponse
impl UnsafeUnpin for LimitsResponse
impl UnwindSafe for LimitsResponse
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