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

com.binance.connector.client.impl.spot.Blvt 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.ParameterChecker;
import com.binance.connector.client.utils.RequestHandler;
import com.binance.connector.client.utils.SignatureGenerator;
import java.util.LinkedHashMap;

/**
 * 

BLVT Endpoints

* 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 *

* tokenName -- optional/string -- BTCDOWN, BTCUP
* recvWindow -- optional/long
* @return String * @see * https://binance-docs.github.io/apidocs/spot/en/#get-blvt-user-limit-info-user_data */ public String userLimit(LinkedHashMap parameters) { return requestHandler.sendSignedRequest(baseUrl, USER_LIMIT, parameters, HttpMethod.GET, showLimitUsage); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy