pub struct InstrumentDiscount {
pub ticker: String,
pub discount_long: f64,
pub discount_short: f64,
}Expand description
The margin discount rates of one instrument.
The broker docs name the fields “rate for long” and “rate for short” and do not give the unit (fraction or percent). Not verified against the live API.
Fields§
§ticker: StringTicker.
discount_long: f64Rate for a long position. 0 if the broker sent none.
discount_short: f64Rate for a short position. 0 if the broker sent none.
Trait Implementations§
Source§impl Clone for InstrumentDiscount
impl Clone for InstrumentDiscount
Source§fn clone(&self) -> InstrumentDiscount
fn clone(&self) -> InstrumentDiscount
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 InstrumentDiscount
impl Debug for InstrumentDiscount
Source§impl<'de> Deserialize<'de> for InstrumentDiscount
impl<'de> Deserialize<'de> for InstrumentDiscount
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 InstrumentDiscount
impl RefUnwindSafe for InstrumentDiscount
impl Send for InstrumentDiscount
impl Sync for InstrumentDiscount
impl Unpin for InstrumentDiscount
impl UnsafeUnpin for InstrumentDiscount
impl UnwindSafe for InstrumentDiscount
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