pub struct MarginsResponse {
pub buy: f64,
pub sell: f64,
pub min_price: f64,
pub max_price: f64,
}Expand description
Response from the get_margins endpoint
Contains margin requirements for a hypothetical order on a given instrument. This is useful for estimating margin requirements before placing an order.
Fields§
§buy: f64Margin required when buying
sell: f64Margin required when selling
min_price: f64The minimum price for the future. Any sell orders submitted lower than this price will be clamped to this minimum.
max_price: f64The maximum price for the future. Any buy orders submitted higher than this price will be clamped to this maximum.
Trait Implementations§
Source§impl Clone for MarginsResponse
impl Clone for MarginsResponse
Source§fn clone(&self) -> MarginsResponse
fn clone(&self) -> MarginsResponse
Returns a duplicate of the value. Read more
1.0.0 · 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 MarginsResponse
impl Debug for MarginsResponse
Source§impl<'de> Deserialize<'de> for MarginsResponse
impl<'de> Deserialize<'de> for MarginsResponse
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
Source§impl Display for MarginsResponse
impl Display for MarginsResponse
Auto Trait Implementations§
impl Freeze for MarginsResponse
impl RefUnwindSafe for MarginsResponse
impl Send for MarginsResponse
impl Sync for MarginsResponse
impl Unpin for MarginsResponse
impl UnsafeUnpin for MarginsResponse
impl UnwindSafe for MarginsResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.