pub struct MaxLoanRequest<'a> { /* private fields */ }Expand description
Query parameters for maximum loan.
Implementations§
Source§impl<'a> MaxLoanRequest<'a>
impl<'a> MaxLoanRequest<'a>
Sourcepub fn new(inst_id: impl Into<Cow<'a, str>>, mgn_mode: TradeMode) -> Self
pub fn new(inst_id: impl Into<Cow<'a, str>>, mgn_mode: TradeMode) -> Self
Create an instrument-based maximum-loan query.
inst_id may contain one to five comma-separated instrument IDs, as
documented by OKX. Use Self::by_currency for Spot-mode manual-borrow
quota queries.
Sourcepub fn by_instrument(
inst_id: impl Into<Cow<'a, str>>,
mgn_mode: TradeMode,
) -> Self
pub fn by_instrument( inst_id: impl Into<Cow<'a, str>>, mgn_mode: TradeMode, ) -> Self
Create an instrument-based maximum-loan query.
Sourcepub fn by_currency(ccy: impl Into<Cow<'a, str>>) -> Self
pub fn by_currency(ccy: impl Into<Cow<'a, str>>) -> Self
Create a currency-based Spot-mode manual-borrow quota query.
Sourcepub fn currency(self, ccy: impl Into<Cow<'a, str>>) -> Self
pub fn currency(self, ccy: impl Into<Cow<'a, str>>) -> Self
Replace the selector with a currency-based Spot-mode query.
Sourcepub fn margin_currency(self, mgn_ccy: impl Into<Cow<'a, str>>) -> Self
pub fn margin_currency(self, mgn_ccy: impl Into<Cow<'a, str>>) -> Self
Set the margin currency.
Sourcepub fn trade_quote_currency(
self,
trade_quote_ccy: impl Into<Cow<'a, str>>,
) -> Self
pub fn trade_quote_currency( self, trade_quote_ccy: impl Into<Cow<'a, str>>, ) -> Self
Set the trade quote currency.
Trait Implementations§
Source§impl<'a> Clone for MaxLoanRequest<'a>
impl<'a> Clone for MaxLoanRequest<'a>
Source§fn clone(&self) -> MaxLoanRequest<'a>
fn clone(&self) -> MaxLoanRequest<'a>
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<'a> Debug for MaxLoanRequest<'a>
impl<'a> Debug for MaxLoanRequest<'a>
Auto Trait Implementations§
impl<'a> Freeze for MaxLoanRequest<'a>
impl<'a> RefUnwindSafe for MaxLoanRequest<'a>
impl<'a> Send for MaxLoanRequest<'a>
impl<'a> Sync for MaxLoanRequest<'a>
impl<'a> Unpin for MaxLoanRequest<'a>
impl<'a> UnsafeUnpin for MaxLoanRequest<'a>
impl<'a> UnwindSafe for MaxLoanRequest<'a>
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