Module: Binance::Spot::Loan
- Included in:
- Binance::Spot
- Defined in:
- lib/binance/spot/loan.rb
Overview
all loan endpoints
Instance Method Summary collapse
-
#adjust_flexible_loan_ltv(loanCoin:, collateralCoin:, adjustmentAmount:, direction:, **kwargs) ⇒ Object
Flexible Loan Adjust LTV (TRADE).
-
#borrow_flexible_loan(loanCoin:, collateralCoin:, **kwargs) ⇒ Object
Flexible Loan Borrow (TRADE).
-
#get_flexible_loan_assets_data(**kwargs) ⇒ Object
Get Flexible Loan Assets Data (USER_DATA).
-
#get_flexible_loan_borrow_history(**kwargs) ⇒ Object
Get Flexible Loan Borrow History(USER_DATA).
-
#get_flexible_loan_collateral_data(**kwargs) ⇒ Object
Get Flexible Loan Collateral Assets Data (USER_DATA).
-
#get_flexible_loan_ltv_adjustment_history(**kwargs) ⇒ Object
Get Flexible Loan LTV Adjustment History (USER_DATA).
-
#get_flexible_loan_ongoing_orders(**kwargs) ⇒ Object
Get Flexible Loan Ongoing Orders (USER_DATA).
-
#get_flexible_loan_repayment_history(**kwargs) ⇒ Object
Get Flexible Loan Repayment History (USER_DATA).
-
#get_loan_borrow_history(**kwargs) ⇒ Object
Get Loan Borrow History (USER_DATA).
-
#get_loan_history(**kwargs) ⇒ Object
Get Crypto Loans Income History (USER_DATA).
-
#get_loan_ltv_adjustment_history(**kwargs) ⇒ Object
Get Loan LTV Adjustment History (USER_DATA).
-
#get_loan_repayment_history(**kwargs) ⇒ Object
Get Loan Repayment History (USER_DATA).
-
#repay_flexible_loan(loanCoin:, collateralCoin:, repayAmount:, **kwargs) ⇒ Object
Flexible Loan Repay (TRADE).
Instance Method Details
#adjust_flexible_loan_ltv(loanCoin:, collateralCoin:, adjustmentAmount:, direction:, **kwargs) ⇒ Object
Flexible Loan Adjust LTV (TRADE)
POST /sapi/v2/loan/flexible/adjust/ltv
88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/binance/spot/loan.rb', line 88 def adjust_flexible_loan_ltv(loanCoin:, collateralCoin:, adjustmentAmount:, direction:, **kwargs) Binance::Utils::Validation.require_param('loanCoin', loanCoin) Binance::Utils::Validation.require_param('collateralCoin', collateralCoin) Binance::Utils::Validation.require_param('adjustmentAmount', adjustmentAmount) Binance::Utils::Validation.require_param('direction', direction) @session.sign_request(:post, '/sapi/v2/loan/flexible/adjust/ltv', params: kwargs.merge( loanCoin: loanCoin, collateralCoin: collateralCoin, adjustmentAmount: adjustmentAmount, direction: direction )) end |
#borrow_flexible_loan(loanCoin:, collateralCoin:, **kwargs) ⇒ Object
Flexible Loan Borrow (TRADE)
POST /sapi/v2/loan/flexible/borrow
43 44 45 46 47 48 49 50 51 |
# File 'lib/binance/spot/loan.rb', line 43 def borrow_flexible_loan(loanCoin:, collateralCoin:, **kwargs) Binance::Utils::Validation.require_param('loanCoin', loanCoin) Binance::Utils::Validation.require_param('collateralCoin', collateralCoin) @session.sign_request(:post, '/sapi/v2/loan/flexible/borrow', params: kwargs.merge( loanCoin: loanCoin, collateralCoin: collateralCoin )) end |
#get_flexible_loan_assets_data(**kwargs) ⇒ Object
Get Flexible Loan Assets Data (USER_DATA)
GET /sapi/v2/loan/flexible/loanable/data
28 29 30 |
# File 'lib/binance/spot/loan.rb', line 28 def get_flexible_loan_assets_data(**kwargs) @session.sign_request(:get, '/sapi/v2/loan/flexible/loanable/data', params: kwargs) end |
#get_flexible_loan_borrow_history(**kwargs) ⇒ Object
Get Flexible Loan Borrow History(USER_DATA)
GET /sapi/v2/loan/flexible/borrow/history
132 133 134 |
# File 'lib/binance/spot/loan.rb', line 132 def get_flexible_loan_borrow_history(**kwargs) @session.sign_request(:get, '/sapi/v2/loan/flexible/borrow/history', params: kwargs) end |
#get_flexible_loan_collateral_data(**kwargs) ⇒ Object
Get Flexible Loan Collateral Assets Data (USER_DATA)
GET /sapi/v2/loan/flexible/collateral/data
16 17 18 |
# File 'lib/binance/spot/loan.rb', line 16 def get_flexible_loan_collateral_data(**kwargs) @session.sign_request(:get, '/sapi/v2/loan/flexible/collateral/data', params: kwargs) end |
#get_flexible_loan_ltv_adjustment_history(**kwargs) ⇒ Object
Get Flexible Loan LTV Adjustment History (USER_DATA)
GET /sapi/v2/loan/flexible/ltv/adjustment/history
115 116 117 |
# File 'lib/binance/spot/loan.rb', line 115 def get_flexible_loan_ltv_adjustment_history(**kwargs) @session.sign_request(:get, '/sapi/v2/loan/flexible/ltv/adjustment/history', params: kwargs) end |
#get_flexible_loan_ongoing_orders(**kwargs) ⇒ Object
Get Flexible Loan Ongoing Orders (USER_DATA)
GET /sapi/v2/loan/flexible/ongoing/orders
147 148 149 |
# File 'lib/binance/spot/loan.rb', line 147 def get_flexible_loan_ongoing_orders(**kwargs) @session.sign_request(:get, '/sapi/v2/loan/flexible/ongoing/orders', params: kwargs) end |
#get_flexible_loan_repayment_history(**kwargs) ⇒ Object
Get Flexible Loan Repayment History (USER_DATA)
GET /sapi/v2/loan/flexible/repay/history
164 165 166 |
# File 'lib/binance/spot/loan.rb', line 164 def get_flexible_loan_repayment_history(**kwargs) @session.sign_request(:get, '/sapi/v2/loan/flexible/repay/history', params: kwargs) end |
#get_loan_borrow_history(**kwargs) ⇒ Object
Get Loan Borrow History (USER_DATA)
GET /sapi/v1/loan/borrow/history
199 200 201 |
# File 'lib/binance/spot/loan.rb', line 199 def get_loan_borrow_history(**kwargs) @session.sign_request(:get, '/sapi/v1/loan/borrow/history', params: kwargs) end |
#get_loan_history(**kwargs) ⇒ Object
Get Crypto Loans Income History (USER_DATA)
GET /sapi/v1/loan/income
181 182 183 |
# File 'lib/binance/spot/loan.rb', line 181 def get_loan_history(**kwargs) @session.sign_request(:get, '/sapi/v1/loan/income', params: kwargs) end |
#get_loan_ltv_adjustment_history(**kwargs) ⇒ Object
Get Loan LTV Adjustment History (USER_DATA)
GET /sapi/v1/loan/ltv/adjustment/history
217 218 219 |
# File 'lib/binance/spot/loan.rb', line 217 def get_loan_ltv_adjustment_history(**kwargs) @session.sign_request(:get, '/sapi/v1/loan/ltv/adjustment/history', params: kwargs) end |
#get_loan_repayment_history(**kwargs) ⇒ Object
Get Loan Repayment History (USER_DATA)
GET /sapi/v1/loan/repay/history
235 236 237 |
# File 'lib/binance/spot/loan.rb', line 235 def get_loan_repayment_history(**kwargs) @session.sign_request(:get, '/sapi/v1/loan/repay/history', params: kwargs) end |
#repay_flexible_loan(loanCoin:, collateralCoin:, repayAmount:, **kwargs) ⇒ Object
Flexible Loan Repay (TRADE)
POST /sapi/v2/loan/flexible/repay
65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/binance/spot/loan.rb', line 65 def repay_flexible_loan(loanCoin:, collateralCoin:, repayAmount:, **kwargs) Binance::Utils::Validation.require_param('loanCoin', loanCoin) Binance::Utils::Validation.require_param('collateralCoin', collateralCoin) Binance::Utils::Validation.require_param('repayAmount', repayAmount) @session.sign_request(:post, '/sapi/v2/loan/flexible/repay', params: kwargs.merge( loanCoin: loanCoin, collateralCoin: collateralCoin, repayAmount: repayAmount )) end |