Class Futures
java.lang.Object
com.binance.connector.client.impl.spot.Futures
Futures Endpoints
All endpoints under the Futures Endpoint section of the API documentation will be implemented in this class.Response will be returned in String format.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadjustCollateral(LinkedHashMap<String,Object> parameters)
POST /sapi/v2/futures/loan/adjustCollateraladjustCollateralHistory(LinkedHashMap<String,Object> parameters)
GET /sapi/v1/futures/loan/adjustCollateral/historyborrow(LinkedHashMap<String,Object> parameters)
POST /sapi/v1/futures/loan/borrowborrowHistory(LinkedHashMap<String,Object> parameters)
GET /sapi/v1/futures/loan/borrow/historycalcAdjustLevel(LinkedHashMap<String,Object> parameters)
GET /sapi/v2/futures/loan/calcAdjustLevelcalcMaxAdjustAmount(LinkedHashMap<String,Object> parameters)
GET /sapi/v2/futures/loan/calcMaxAdjustAmountcollateralRepay(LinkedHashMap<String,Object> parameters)
Repay with collateral.collateralRepayLimit(LinkedHashMap<String,Object> parameters)
Check the maximum and minimum limit when repay with collateral.collateralRepayQuote(LinkedHashMap<String,Object> parameters)
Get quote before repay with collateral is mandatory, the quote will be valid within 25 seconds.collateralRepayResult(LinkedHashMap<String,Object> parameters)
Check collateral repayment result.futuresTransfer(LinkedHashMap<String,Object> parameters)
Execute transfer between spot account and futures account.futuresTransferHistory(LinkedHashMap<String,Object> parameters)
GET /sapi/v1/futures/transferinterestHistory(LinkedHashMap<String,Object> parameters)
GET /sapi/v1/futures/loan/interestHistoryliquidationHistory(LinkedHashMap<String,Object> parameters)
GET /sapi/v1/futures/loan/liquidationHistoryloanConfigs(LinkedHashMap<String,Object> parameters)
GET /sapi/v2/futures/loan/configsloanWallet(LinkedHashMap<String,Object> parameters)
GET /sapi/v2/futures/loan/walletrepay(LinkedHashMap<String,Object> parameters)
POST /sapi/v1/futures/loan/repayrepayHistory(LinkedHashMap<String,Object> parameters)
GET /sapi/v1/futures/loan/repay/history
-
Constructor Details
-
Futures
-
-
Method Details
-
futuresTransfer
Execute transfer between spot account and futures account.
POST /sapi/v1/futures/transfer- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
asset -- mandatory/string -- The asset being transferred, e.g. USDT
amount -- mandatory/decimal -- The amount to be transferred
type -- mandatory/int -- 1: transfer from spot account to USDT-M futures account. 2: transfer from USDT-M futures account to spot account. 3: transfer from spot account to COIN-M futures account. 4: transfer from COIN-M futures account to spot account.
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#new-future-account-transfer-user_data
-
futuresTransferHistory
GET /sapi/v1/futures/transfer- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
asset -- mandatory/string -- The asset being transferred, e.g. USDT
startTime -- mandatory/long
endTime -- optional/long
current -- optional/long -- Currently querying page. Start from 1. Default:1
size -- optional/long -- Default:10 Max:100
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#get-future-account-transaction-history-list-user_data
-
borrow
POST /sapi/v1/futures/loan/borrow- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
coin -- mandatory/string
amount -- mandatory/decimal -- when collateralAmount is empty
collateralCoin -- mandatory/string
collateralAmount -- mandatory/decimal -- when amount is empty
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#borrow-for-cross-collateral-trade
-
borrowHistory
GET /sapi/v1/futures/loan/borrow/history- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
coin -- optional/string
startTime -- optional/long
endTime -- optional/long
limit -- optional/long -- default 500, max 1000
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-borrow-history-user_data
-
repay
POST /sapi/v1/futures/loan/repay- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
coin -- mandatory/string
collateralCoin -- mandatory/string
amount -- mandatory/decimal
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#repay-for-cross-collateral-trade
-
repayHistory
GET /sapi/v1/futures/loan/repay/history- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
coin -- optional/string
startTime -- optional/long
endTime -- optional/long
limit -- optional/long -- default 500, max 1000
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-repayment-history-user_data
-
loanWallet
GET /sapi/v2/futures/loan/wallet- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-wallet-user_data
-
loanConfigs
GET /sapi/v2/futures/loan/configs- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
loanCoin -- optional/string
collateralCoin -- optional/long
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-information-v2-user_data
-
calcAdjustLevel
GET /sapi/v2/futures/loan/calcAdjustLevel- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
loanCoin -- mandatory/string
collateralCoin -- mandatory/string
amount -- mandatory/decimal
direction -- mandatory/enum -- "ADDITIONAL", "REDUCED"
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#calculate-rate-after-adjust-cross-collateral-ltv-v2-user_data
-
calcMaxAdjustAmount
GET /sapi/v2/futures/loan/calcMaxAdjustAmount- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
loanCoin -- mandatory/string
collateralCoin -- mandatory/string
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#get-max-amount-for-adjust-cross-collateral-ltv-v2-user_data
-
adjustCollateral
POST /sapi/v2/futures/loan/adjustCollateral- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
loanCoin -- mandatory/string
collateralCoin -- mandatory/string
amount -- mandatory/decimal
direction -- mandatory/enum -- "ADDITIONAL", "REDUCED"
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#calculate-rate-after-adjust-cross-collateral-ltv-v2-user_data
-
adjustCollateralHistory
GET /sapi/v1/futures/loan/adjustCollateral/history- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
loanCoin -- optional/string
collateralCoin -- optional/string
startTime -- optional/long
endTime -- optional/long
limit -- optional/long -- default 500, max 1000
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#adjust-cross-collateral-ltv-history-user_data
-
liquidationHistory
GET /sapi/v1/futures/loan/liquidationHistory- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
loanCoin -- optional/string
collateralCoin -- optional/string
startTime -- optional/long
endTime -- optional/long
limit -- optional/long -- default 500, max 1000
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-liquidation-history-user_data
-
collateralRepayLimit
Check the maximum and minimum limit when repay with collateral.
GET /sapi/v1/futures/loan/collateralRepayLimit- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
coin -- mandatory/string
collateralCoin -- mandatory/string
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#check-collateral-repay-limit-user_data
-
collateralRepayQuote
Get quote before repay with collateral is mandatory, the quote will be valid within 25 seconds.
GET /sapi/v1/futures/loan/collateralRepay- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
coin -- mandatory/string
collateralCoin -- mandatory/string
amount -- mandatory/decimal -- repay amount
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#get-collateral-repay-quote-user_data
-
collateralRepay
Repay with collateral. Get quote before repay with collateral is mandatory, the quote will be valid within 25 seconds.
POST /sapi/v1/futures/loan/collateralRepay- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
quoteId -- mandatory/string
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#repay-with-collateral-user_data
-
collateralRepayResult
Check collateral repayment result.
GET /sapi/v1/futures/loan/collateralRepayResult- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
quoteId -- mandatory/string
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#collateral-repayment-result-user_data
-
interestHistory
GET /sapi/v1/futures/loan/interestHistory- Parameters:
parameters
- LinkedHashedMap of String,Object pair where String is the name of the parameter and Object is the value of the parameter
collateralCoin -- optional/string
startTime -- optional/long
endTime -- optional/long
current -- optional/long -- Currently querying page. Start from 1. Default:1
limit -- optional/long -- default 500, max 1000
recvWindow -- optional/long- Returns:
- String
- See Also:
- https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-interest-history-user_data
-