pub struct CryptoLoanClient { /* private fields */ }Implementations§
Source§impl CryptoLoanClient
impl CryptoLoanClient
pub fn new(client: RestClient) -> Self
Sourcepub async fn get_collateral_data(
&self,
ltv_type: Option<&str>,
) -> Result<ServerResponse<Value>>
pub async fn get_collateral_data( &self, ltv_type: Option<&str>, ) -> Result<ServerResponse<Value>>
Get loan product info https://bybit-exchange.github.io/docs/v5/crypto-loan/collateral-data
Sourcepub async fn borrow(
&self,
ltv_type: &str,
loan_currency: &str,
loan_amount: &str,
collateral_currency: &str,
max_rate: Option<&str>,
) -> Result<ServerResponse<Value>>
pub async fn borrow( &self, ltv_type: &str, loan_currency: &str, loan_amount: &str, collateral_currency: &str, max_rate: Option<&str>, ) -> Result<ServerResponse<Value>>
Borrow crypto loan https://bybit-exchange.github.io/docs/v5/crypto-loan/borrow
Sourcepub async fn repay(
&self,
order_id: &str,
repay_amount: Option<&str>,
) -> Result<ServerResponse<Value>>
pub async fn repay( &self, order_id: &str, repay_amount: Option<&str>, ) -> Result<ServerResponse<Value>>
Repay crypto loan https://bybit-exchange.github.io/docs/v5/crypto-loan/repay
Sourcepub async fn get_ongoing_orders(
&self,
order_id: Option<&str>,
loan_currency: Option<&str>,
collateral_currency: Option<&str>,
limit: Option<i32>,
cursor: Option<&str>,
) -> Result<ServerResponse<Value>>
pub async fn get_ongoing_orders( &self, order_id: Option<&str>, loan_currency: Option<&str>, collateral_currency: Option<&str>, limit: Option<i32>, cursor: Option<&str>, ) -> Result<ServerResponse<Value>>
Get ongoing orders https://bybit-exchange.github.io/docs/v5/crypto-loan/ongoing-orders
Sourcepub async fn get_borrow_history(
&self,
order_id: Option<&str>,
loan_currency: Option<&str>,
collateral_currency: Option<&str>,
start_time: Option<i64>,
end_time: Option<i64>,
limit: Option<i32>,
cursor: Option<&str>,
) -> Result<ServerResponse<Value>>
pub async fn get_borrow_history( &self, order_id: Option<&str>, loan_currency: Option<&str>, collateral_currency: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i32>, cursor: Option<&str>, ) -> Result<ServerResponse<Value>>
Get borrow history https://bybit-exchange.github.io/docs/v5/crypto-loan/borrow-history
Sourcepub async fn get_max_collateral_amount(
&self,
ltv_type: &str,
loan_currency: &str,
loan_amount: &str,
collateral_currency: &str,
) -> Result<ServerResponse<Value>>
pub async fn get_max_collateral_amount( &self, ltv_type: &str, loan_currency: &str, loan_amount: &str, collateral_currency: &str, ) -> Result<ServerResponse<Value>>
Get max collateral amount https://bybit-exchange.github.io/docs/v5/crypto-loan/max-collateral-amount
Sourcepub async fn adjust_ltv(
&self,
order_id: &str,
amount: &str,
direction: i32,
) -> Result<ServerResponse<Value>>
pub async fn adjust_ltv( &self, order_id: &str, amount: &str, direction: i32, ) -> Result<ServerResponse<Value>>
Adjust LTV https://bybit-exchange.github.io/docs/v5/crypto-loan/adjust-ltv
Sourcepub async fn get_adjustment_history(
&self,
order_id: Option<&str>,
adjustment_id: Option<&str>,
start_time: Option<i64>,
end_time: Option<i64>,
limit: Option<i32>,
cursor: Option<&str>,
) -> Result<ServerResponse<Value>>
pub async fn get_adjustment_history( &self, order_id: Option<&str>, adjustment_id: Option<&str>, start_time: Option<i64>, end_time: Option<i64>, limit: Option<i32>, cursor: Option<&str>, ) -> Result<ServerResponse<Value>>
Get adjustment history https://bybit-exchange.github.io/docs/v5/crypto-loan/adjustment-history
Trait Implementations§
Source§impl Clone for CryptoLoanClient
impl Clone for CryptoLoanClient
Source§fn clone(&self) -> CryptoLoanClient
fn clone(&self) -> CryptoLoanClient
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 moreAuto Trait Implementations§
impl Freeze for CryptoLoanClient
impl !RefUnwindSafe for CryptoLoanClient
impl Send for CryptoLoanClient
impl Sync for CryptoLoanClient
impl Unpin for CryptoLoanClient
impl !UnwindSafe for CryptoLoanClient
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