pub struct BorrowRate {
pub currency: String,
pub symbol: Option<String>,
pub rate: f64,
pub timestamp: i64,
pub datetime: String,
pub is_isolated: bool,
pub info: Value,
}Expand description
Borrow rate information for margin trading
Fields§
§currency: StringCurrency code (e.g., “BTC”, “USDT”)
symbol: Option<String>Trading symbol for isolated margin (e.g., “BTC/USDT”)
rate: f64Daily interest rate
timestamp: i64Timestamp in milliseconds
datetime: StringISO 8601 datetime string
is_isolated: boolWhether this is for isolated margin
info: ValueRaw response data from the exchange
Implementations§
Source§impl BorrowRate
impl BorrowRate
Sourcepub fn new_cross(
currency: String,
rate: f64,
timestamp: i64,
info: Value,
) -> BorrowRate
pub fn new_cross( currency: String, rate: f64, timestamp: i64, info: Value, ) -> BorrowRate
Create a new borrow rate for cross margin
Sourcepub fn new_isolated(
currency: String,
symbol: String,
rate: f64,
timestamp: i64,
info: Value,
) -> BorrowRate
pub fn new_isolated( currency: String, symbol: String, rate: f64, timestamp: i64, info: Value, ) -> BorrowRate
Create a new borrow rate for isolated margin
Trait Implementations§
Source§impl Clone for BorrowRate
impl Clone for BorrowRate
Source§fn clone(&self) -> BorrowRate
fn clone(&self) -> BorrowRate
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 BorrowRate
impl Debug for BorrowRate
Source§impl<'de> Deserialize<'de> for BorrowRate
impl<'de> Deserialize<'de> for BorrowRate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BorrowRate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BorrowRate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BorrowRate
impl PartialEq for BorrowRate
Source§impl Serialize for BorrowRate
impl Serialize for BorrowRate
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for BorrowRate
Auto Trait Implementations§
impl Freeze for BorrowRate
impl RefUnwindSafe for BorrowRate
impl Send for BorrowRate
impl Sync for BorrowRate
impl Unpin for BorrowRate
impl UnwindSafe for BorrowRate
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