CollateralInfo

Struct CollateralInfo 

Source
pub struct CollateralInfo {
Show 13 fields pub available_to_borrow: String, pub free_borrowing_amount: f64, pub free_borrow_amount: f64, pub max_borrowing_amount: f64, pub hourly_borrow_rate: f64, pub borrow_usage_rate: f64, pub collateral_switch: bool, pub borrow_amount: f64, pub borrowable: bool, pub currency: String, pub margin_collateral: bool, pub free_borrowing_limit: String, pub collateral_ratio: String,
}
Expand description

Represents collateral information for a single coin.

Details the collateral eligibility, borrowing limits, and rates for a specific coin. Bots use this to determine which coins to use as collateral and manage borrowing costs.

Fields§

§available_to_borrow: String

The amount available to borrow for the coin.

The total borrowing capacity for the coin, in the coin’s units. Bots use this to assess borrowing potential for margin trading.

§free_borrowing_amount: f64

The free borrowing amount available.

The portion of the borrowing capacity that is interest-free, if any. Bots use this to optimize borrowing by prioritizing free borrowing.

§free_borrow_amount: f64

The free borrow amount limit.

The maximum interest-free borrowing limit for the coin. Bots use this to plan borrowing strategies within free limits.

§max_borrowing_amount: f64

The maximum borrowing amount for the coin.

The total borrowing limit for the coin, including interest-bearing amounts. Bots use this to ensure borrowing stays within account limits.

§hourly_borrow_rate: f64

The hourly borrow rate for the coin.

The interest rate applied to borrowed amounts per hour, as a decimal (e.g., 0.0001 for 0.01%). Bots use this to calculate borrowing costs.

§borrow_usage_rate: f64

The borrow usage rate.

The percentage of the borrowing limit currently utilized. Bots use this to monitor borrowing capacity and avoid over-leveraging.

§collateral_switch: bool

Whether the coin is enabled as collateral.

true if the coin can be used as collateral for margin trading, false otherwise. Bots use this to select appropriate collateral assets.

§borrow_amount: f64

The current borrowed amount for the coin.

The total amount of the coin currently borrowed. Bots use this to track liabilities and calculate interest costs.

§borrowable: bool

Whether the coin is borrowable.

true if the coin can be borrowed for margin trading, false otherwise. Bots use this to determine borrowing eligibility.

§currency: String

The currency of the coin (e.g., “USDT”).

Specifies the coin type. Bots should verify this matches the expected currency for their margin type.

§margin_collateral: bool

Whether the coin is used as margin collateral.

true if the coin is actively used as collateral, false otherwise. Bots use this to confirm collateral allocation.

§free_borrowing_limit: String

The free borrowing limit as a string.

The maximum interest-free borrowing limit for the coin, represented as a string. Bots can use this for precise borrowing calculations.

§collateral_ratio: String

The collateral ratio for the coin.

The ratio at which the coin contributes to margin requirements (e.g., “0.9” for 90%). Bots use this to calculate effective collateral value.

Trait Implementations§

Source§

impl Clone for CollateralInfo

Source§

fn clone(&self) -> CollateralInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CollateralInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CollateralInfo

Source§

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 Serialize for CollateralInfo

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,