Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* All endpoints under the
* BLVT Endpoint
* section of the API documentation will be implemented in this class.
*
* Response will be returned in String format.
*/
public class Blvt {
private final String baseUrl;
private final RequestHandler requestHandler;
private final boolean showLimitUsage;
public Blvt(String baseUrl, String apiKey, String secretKey, boolean showLimitUsage) {
this.baseUrl = baseUrl;
this.requestHandler = new RequestHandler(apiKey, new HmacSignatureGenerator(secretKey));
this.showLimitUsage = showLimitUsage;
}
public Blvt(String baseUrl, String apiKey, SignatureGenerator signatureGenerator, boolean showLimitUsage) {
this.baseUrl = baseUrl;
this.requestHandler = new RequestHandler(apiKey, signatureGenerator);
this.showLimitUsage = showLimitUsage;
}
private final String BLVT_INFO = "/sapi/v1/blvt/tokenInfo";
/**
* GET /sapi/v1/blvt/tokenInfo
*
* @param
* parameters LinkedHashedMap of String,Object pair
* where String is the name of the parameter and Object is the value of the parameter
*
* tokenName -- optional/string -- BTCDOWN, BTCUP
* @return String
* @see
* https://binance-docs.github.io/apidocs/spot/en/#get-blvt-info-market_data
*/
public String blvtInfo(LinkedHashMap parameters) {
return requestHandler.sendWithApiKeyRequest(baseUrl, BLVT_INFO, parameters, HttpMethod.GET, showLimitUsage);
}
private final String SUBSCRIBE = "/sapi/v1/blvt/subscribe";
/**
* POST /sapi/v1/blvt/subscribe
*
* @param
* parameters LinkedHashedMap of String,Object pair
* where String is the name of the parameter and Object is the value of the parameter
*
* tokenName -- mandatory/string -- BTCDOWN, BTCUP
* cost -- mandatory/decimal -- spot balance
* recvWindow -- optional/long
* @return String
* @see
* https://binance-docs.github.io/apidocs/spot/en/#subscribe-blvt-user_data
*/
public String subscribe(LinkedHashMap parameters) {
ParameterChecker.checkParameter(parameters, "tokenName", String.class);
ParameterChecker.checkRequiredParameter(parameters, "cost");
return requestHandler.sendSignedRequest(baseUrl, SUBSCRIBE, parameters, HttpMethod.POST, showLimitUsage);
}
private final String SUBSCRIPTION_RECORD = "/sapi/v1/blvt/subscribe/record";
/**
* GET /sapi/v1/blvt/subscribe/record
*
* @param
* parameters LinkedHashedMap of String,Object pair
* where String is the name of the parameter and Object is the value of the parameter
*
* tokenName -- optional/string -- BTCDOWN, BTCUP
* id -- optional/long
* startTime -- optional/long
* endTime -- optional/long
* limit -- optional/int -- default 1000, max 1000
* recvWindow -- optional/long
* @return String
* @see
* https://binance-docs.github.io/apidocs/spot/en/#query-subscription-record-user_data
*/
public String subscriptionRecord(LinkedHashMap parameters) {
return requestHandler.sendSignedRequest(baseUrl, SUBSCRIPTION_RECORD, parameters, HttpMethod.GET, showLimitUsage);
}
private final String REDEEM = "/sapi/v1/blvt/redeem";
/**
* POST /sapi/v1/blvt/redeem
*
* @param
* parameters LinkedHashedMap of String,Object pair
* where String is the name of the parameter and Object is the value of the parameter
*
* tokenName -- mandatory/string -- BTCDOWN, BTCUP
* amount -- mandatory/decimal -- spot balance
* recvWindow -- optional/long
* @return String
* @see
* https://binance-docs.github.io/apidocs/spot/en/#redeem-blvt-user_data
*/
public String redeem(LinkedHashMap parameters) {
ParameterChecker.checkParameter(parameters, "tokenName", String.class);
ParameterChecker.checkRequiredParameter(parameters, "amount");
return requestHandler.sendSignedRequest(baseUrl, REDEEM, parameters, HttpMethod.POST, showLimitUsage);
}
private final String REDEEM_RECORD = "/sapi/v1/blvt/redeem/record";
/**
* GET /sapi/v1/blvt/redeem/record
*
* @param
* parameters LinkedHashedMap of String,Object pair
* where String is the name of the parameter and Object is the value of the parameter
*
* tokenName -- optional/string -- BTCDOWN, BTCUP
* id -- optional/long
* startTime -- optional/long
* endTime -- optional/long
* limit -- optional/int -- default 1000, max 1000
* recvWindow -- optional/long
* @return String
* @see
* https://binance-docs.github.io/apidocs/spot/en/#query-redemption-record-user_data
*/
public String redeemRecord(LinkedHashMap parameters) {
return requestHandler.sendSignedRequest(baseUrl, REDEEM_RECORD, parameters, HttpMethod.GET, showLimitUsage);
}
private final String USER_LIMIT = "/sapi/v1/blvt/userLimit";
/**
* GET /sapi/v1/blvt/userLimit
*
* @param
* parameters LinkedHashedMap of String,Object pair
* where String is the name of the parameter and Object is the value of the parameter
*