All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.binance.connector.client.impl.spot.CryptoLoans Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
package com.binance.connector.client.impl.spot;

import com.binance.connector.client.enums.HttpMethod;
import com.binance.connector.client.utils.ParameterChecker;
import com.binance.connector.client.utils.RequestHandler;

import java.util.LinkedHashMap;

/**
 * 

Crypto Loans Endpoints

* All endpoints under the * Crypto Loans Endpoint * section of the API documentation will be implemented in this class. *
* Response will be returned in String format. */ public class CryptoLoans { private final String baseUrl; private final RequestHandler requestHandler; private final boolean showLimitUsage; public CryptoLoans(String baseUrl, String apiKey, String secretKey, boolean showLimitUsage) { this.baseUrl = baseUrl; this.requestHandler = new RequestHandler(apiKey, secretKey); this.showLimitUsage = showLimitUsage; } private final String LOAN_INCOME = "/sapi/v1/loan/income"; /** * GET /sapi/v1/loan/income *
* @param * 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
* type -- optional/string -- All types will be returned by default. Enum:borrowIn ,collateralSpent, repayAmount, collateralReturn(Collateral return after repayment), addCollateral, removeCollateral, collateralReturnAfterLiquidation
* startTime -- optional/long
* endTime -- optional/long
* limit -- optional/int -- default 20, max 100
* recvWindow -- optional/long
* @return String * @see * https://binance-docs.github.io/apidocs/spot/en/#get-crypto-loans-income-history-user_data */ public String loanIncome(LinkedHashMap parameters) { ParameterChecker.checkParameter(parameters, "asset", String.class); return requestHandler.sendSignedRequest(baseUrl, LOAN_INCOME, parameters, HttpMethod.GET, showLimitUsage); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy