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

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

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

import java.util.Map;

import com.binance.connector.client.enums.HttpMethod;
import com.binance.connector.client.utils.ParameterChecker;
import com.binance.connector.client.utils.ProxyAuth;
import com.binance.connector.client.utils.RequestHandler;
import com.binance.connector.client.utils.signaturegenerator.HmacSignatureGenerator;
import com.binance.connector.client.utils.signaturegenerator.SignatureGenerator;

/**
 * 

C2C Endpoints

* All endpoints under the * C2C Endpoint * section of the API documentation will be implemented in this class. *
* Response will be returned in String format. */ public class C2C { private final String baseUrl; private final RequestHandler requestHandler; private final boolean showLimitUsage; public C2C(String baseUrl, String apiKey, String secretKey, boolean showLimitUsage, ProxyAuth proxy) { this.baseUrl = baseUrl; this.requestHandler = new RequestHandler(apiKey, new HmacSignatureGenerator(secretKey), proxy); this.showLimitUsage = showLimitUsage; } public C2C(String baseUrl, String apiKey, SignatureGenerator signatureGenerator, boolean showLimitUsage, ProxyAuth proxy) { this.baseUrl = baseUrl; this.requestHandler = new RequestHandler(apiKey, signatureGenerator, proxy); this.showLimitUsage = showLimitUsage; } private final String LIST_ORDER_HISTORY = "/sapi/v1/c2c/orderMatch/listUserOrderHistory"; /** * GET /sapi/v1/c2c/orderMatch/listUserOrderHistory *
* @param * parameters Map of String,Object pair * where String is the name of the parameter and Object is the value of the parameter *

* tradeType -- mandatory/string -- BUY, SELL
* startTimestamp -- optional/long
* endTimestamp -- optional/long
* page -- optional/int -- default 1
* rows -- optional/int -- default 100, max 500
* recvWindow -- optional/long
* @return String * @see * https://developers.binance.com/docs/c2c/rest-api/Get-C2C-Trade-History */ public String listUserOrderHistory(Map parameters) { ParameterChecker.checkParameter(parameters, "tradeType", String.class); return requestHandler.sendSignedRequest(baseUrl, LIST_ORDER_HISTORY, parameters, HttpMethod.GET, showLimitUsage); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy