com.binance.connector.client.impl.spot.Rebate Maven / Gradle / Ivy
package com.binance.connector.client.impl.spot;
import com.binance.connector.client.enums.HttpMethod;
import com.binance.connector.client.utils.HmacSignatureGenerator;
import com.binance.connector.client.utils.RequestHandler;
import com.binance.connector.client.utils.SignatureGenerator;
import java.util.LinkedHashMap;
/**
* Rebate Endpoints
* All endpoints under the
* Rebate Endpoint
* section of the API documentation will be implemented in this class.
*
* Response will be returned in String format.
*/
public class Rebate {
private final String baseUrl;
private final RequestHandler requestHandler;
private final boolean showLimitUsage;
public Rebate(String baseUrl, String apiKey, String secretKey, boolean showLimitUsage) {
this.baseUrl = baseUrl;
this.requestHandler = new RequestHandler(apiKey, new HmacSignatureGenerator(secretKey));
this.showLimitUsage = showLimitUsage;
}
public Rebate(String baseUrl, String apiKey, SignatureGenerator signatureGenerator, boolean showLimitUsage) {
this.baseUrl = baseUrl;
this.requestHandler = new RequestHandler(apiKey, signatureGenerator);
this.showLimitUsage = showLimitUsage;
}
private final String TAX_QUERY = "/sapi/v1/rebate/taxQuery";
/**
* GET /sapi/v1/rebate/taxQuery
*
* @param
* parameters LinkedHashedMap of String,Object pair
* where String is the name of the parameter and Object is the value of the parameter
*
* startTime -- optional/long
* endTime -- optional/long
* page -- optional/int -- Default 1
* recvWindow -- optional/long
* @return String
* @see
* https://binance-docs.github.io/apidocs/spot/en/#get-spot-rebate-history-records-user_data
*/
public String taxQuery(LinkedHashMap parameters) {
return requestHandler.sendSignedRequest(baseUrl, TAX_QUERY, parameters, HttpMethod.GET, showLimitUsage);
}
}