module Binance::Spot::Futures
def adjust_cross_collateral(loanCoin:, collateralCoin:, amount:, direction:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#adjust-cross-collateral-ltv-v2-trade -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000
Parameters:
-
kwargs(Hash) -- -
direction(String) -- "ADDITIONAL", "REDUCED" -
amount(Float) -- -
collateralCoin(String) -- -
loanCoin(String) --
def adjust_cross_collateral(loanCoin:, collateralCoin:, amount:, direction:, **kwargs) Binance::Utils::Validation.require_param('loanCoin', loanCoin) Binance::Utils::Validation.require_param('collateralCoin', collateralCoin) Binance::Utils::Validation.require_param('amount', amount) Binance::Utils::Validation.require_param('direction', direction) @session.sign_request(:post, '/sapi/v2/futures/loan/adjustCollateral', params: kwargs.merge( loanCoin: loanCoin, collateralCoin: collateralCoin, amount: amount, direction: direction )) end
def adjust_cross_collateral_history(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#adjust-cross-collateral-ltv-history-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000 -
:limit(Integer) -- default 500, max 1000 -
:endTime(Integer) -- -
:startTime(Integer) -- -
:collateralCoin(String) -- -
:loanCoin(String) --
Parameters:
-
kwargs(Hash) --
def adjust_cross_collateral_history(**kwargs) @session.sign_request(:get, '/sapi/v1/futures/loan/adjustCollateral/history', params: kwargs) end
def calculate_adjust_max_amount(loanCoin:, collateralCoin:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#get-max-amount-for-adjust-cross-collateral-ltv-v2-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000
Parameters:
-
kwargs(Hash) -- -
collateralCoin(String) -- -
loanCoin(String) --
def calculate_adjust_max_amount(loanCoin:, collateralCoin:, **kwargs) Binance::Utils::Validation.require_param('loanCoin', loanCoin) Binance::Utils::Validation.require_param('collateralCoin', collateralCoin) @session.sign_request(:get, '/sapi/v2/futures/loan/calcMaxAdjustAmount', params: kwargs.merge( loanCoin: loanCoin, collateralCoin: collateralCoin )) end
def calculate_adjust_rate(loanCoin:, collateralCoin:, amount:, direction:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#calculate-rate-after-adjust-cross-collateral-ltv-v2-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000
Parameters:
-
kwargs(Hash) -- -
direction(String) -- "ADDITIONAL", "REDUCED" -
amount(Float) -- -
collateralCoin(String) -- -
loanCoin(String) --
def calculate_adjust_rate(loanCoin:, collateralCoin:, amount:, direction:, **kwargs) Binance::Utils::Validation.require_param('loanCoin', loanCoin) Binance::Utils::Validation.require_param('collateralCoin', collateralCoin) Binance::Utils::Validation.require_param('amount', amount) Binance::Utils::Validation.require_param('direction', direction) @session.sign_request(:get, '/sapi/v2/futures/loan/calcAdjustLevel', params: kwargs.merge( loanCoin: loanCoin, collateralCoin: collateralCoin, amount: amount, direction: direction )) end
def collateral_repay_limit(coin:, collateralCoin:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#check-collateral-repay-limit-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000
Parameters:
-
kwargs(Hash) -- -
collateralCoin(String) -- -
coin(String) --
def collateral_repay_limit(coin:, collateralCoin:, **kwargs) Binance::Utils::Validation.require_param('coin', coin) Binance::Utils::Validation.require_param('collateralCoin', collateralCoin) @session.sign_request(:get, '/sapi/v1/futures/loan/collateralRepayLimit', params: kwargs.merge( coin: coin, collateralCoin: collateralCoin )) end
def collateral_repay_quote(coin:, collateralCoin:, amount:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#get-collateral-repay-quote-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000
Parameters:
-
kwargs(Hash) -- -
amount(Float) -- -
collateralCoin(String) -- -
coin(String) --
def collateral_repay_quote(coin:, collateralCoin:, amount:, **kwargs) Binance::Utils::Validation.require_param('coin', coin) Binance::Utils::Validation.require_param('collateralCoin', collateralCoin) Binance::Utils::Validation.require_param('amount', amount) @session.sign_request(:get, '/sapi/v1/futures/loan/collateralRepay', params: kwargs.merge( coin: coin, collateralCoin: collateralCoin, amount: amount )) end
def cross_collateral_borrow(coin:, collateralCoin:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#borrow-for-cross-collateral-trade -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000 -
:collateralAmount(Float) -- Mandatory when amount is empty. -
:amount(Float) -- Mandatory when collateralAmount is empty.
Parameters:
-
kwargs(Hash) -- -
collateralCoin(String) -- -
coin(String) --
def cross_collateral_borrow(coin:, collateralCoin:, **kwargs) Binance::Utils::Validation.require_param('coin', coin) Binance::Utils::Validation.require_param('collateralCoin', collateralCoin) @session.sign_request(:post, '/sapi/v1/futures/loan/borrow', params: kwargs.merge( coin: coin, collateralCoin: collateralCoin )) end
def cross_collateral_borrow_history(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-borrow-history-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000 -
:limit(Integer) -- default 500, max 1000 -
:endTime(Integer) -- -
:startTime(Integer) -- -
:coin(String) --
Parameters:
-
kwargs(Hash) --
def cross_collateral_borrow_history(**kwargs) @session.sign_request(:get, '/sapi/v1/futures/loan/borrow/history', params: kwargs) end
def cross_collateral_info(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-information-v2-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000 -
:collateralCoin(String) -- -
:loanCoin(String) --
Parameters:
-
kwargs(Hash) --
def cross_collateral_info(**kwargs) @session.sign_request(:get, '/sapi/v2/futures/loan/configs', params: kwargs) end
def cross_collateral_interest_history(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-interest-history-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000 -
:limit(Integer) -- default 500, max 1000 -
:current(Integer) -- Currently querying page. Start from 1. Default:1 -
:endTime(Integer) -- -
:startTime(Integer) -- -
:collateralCoin(String) --
Parameters:
-
kwargs(Hash) --
def cross_collateral_interest_history(**kwargs) @session.sign_request(:get, '/sapi/v1/futures/loan/interestHistory', params: kwargs) end
def cross_collateral_liquidation_history(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-liquidation-history-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000 -
:limit(Integer) -- default 500, max 1000 -
:endTime(Integer) -- -
:startTime(Integer) -- -
:collateralCoin(String) -- -
:loanCoin(String) --
Parameters:
-
kwargs(Hash) --
def cross_collateral_liquidation_history(**kwargs) @session.sign_request(:get, '/sapi/v1/futures/loan/liquidationHistory', params: kwargs) end
def cross_collateral_repay(coin:, collateralCoin:, amount:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#repay-for-cross-collateral-trade -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000
Parameters:
-
kwargs(Hash) -- -
amount(Float) -- -
collateralCoin(String) -- -
coin(String) --
def cross_collateral_repay(coin:, collateralCoin:, amount:, **kwargs) Binance::Utils::Validation.require_param('coin', coin) Binance::Utils::Validation.require_param('collateralCoin', collateralCoin) Binance::Utils::Validation.require_param('amount', amount) @session.sign_request(:post, '/sapi/v1/futures/loan/repay', params: kwargs.merge( coin: coin, collateralCoin: collateralCoin, amount: amount )) end
def cross_collateral_repay_history(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-repayment-history-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000 -
:limit(Integer) -- default 500, max 1000 -
:endTime(Integer) -- -
:startTime(Integer) -- -
:coin(String) --
Parameters:
-
kwargs(Hash) --
def cross_collateral_repay_history(**kwargs) @session.sign_request(:get, '/sapi/v1/futures/loan/repay/history', params: kwargs) end
def cross_collateral_wallet(**kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-wallet-v2-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000
Parameters:
-
kwargs(Hash) --
def cross_collateral_wallet(**kwargs) @session.sign_request(:get, '/sapi/v2/futures/loan/wallet', params: kwargs) end
def futures_account_transfer(asset:, amount:, type:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#new-future-account-transfer-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000
Parameters:
-
kwargs(Hash) -- -
type(Integer) -- 1: transfer from spot account to USDT-M futures account.
-
amount(Float) -- -
asset(String) --
def futures_account_transfer(asset:, amount:, type:, **kwargs) Binance::Utils::Validation.require_param('asset', asset) Binance::Utils::Validation.require_param('amount', amount) Binance::Utils::Validation.require_param('type', type) @session.sign_request(:post, '/sapi/v1/futures/transfer', params: kwargs.merge( asset: asset, amount: amount, type: type )) end
def futures_account_transfer_history(asset:, startTime:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#get-future-account-transaction-history-list-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000 -
:size(Integer) -- Default:10 Max:100 -
:current(Integer) -- Currently querying page. Start from 1. Default:1 -
:endTime(Integer) --
Parameters:
-
kwargs(Hash) -- -
startTime(Integer) -- -
asset(String) --
def futures_account_transfer_history(asset:, startTime:, **kwargs) Binance::Utils::Validation.require_param('asset', asset) Binance::Utils::Validation.require_param('startTime', startTime) @session.sign_request(:get, '/sapi/v1/futures/transfer', params: kwargs.merge( asset: asset, startTime: startTime )) end
def repay_with_collateral(quoteId:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#repay-with-collateral-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000
Parameters:
-
kwargs(Hash) -- -
quoteId(String) --
def repay_with_collateral(quoteId:, **kwargs) Binance::Utils::Validation.require_param('quoteId', quoteId) @session.sign_request(:post, '/sapi/v1/futures/loan/collateralRepay', params: kwargs.merge( quoteId: quoteId )) end
def repayment_result(quoteId:, **kwargs)
- See: https://binance-docs.github.io/apidocs/spot/en/#collateral-repayment-result-user_data -
Options Hash:
(**kwargs)-
:recvWindow(Integer) -- The value cannot be greater than 60000
Parameters:
-
kwargs(Hash) -- -
quoteId(String) --
def repayment_result(quoteId:, **kwargs) Binance::Utils::Validation.require_param('quoteId', quoteId) @session.sign_request(:get, '/sapi/v1/futures/loan/collateralRepayResult', params: kwargs.merge( quoteId: quoteId )) end