com.binance4j.pay.client.PayClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of binance4j-pay Show documentation
Show all versions of binance4j-pay Show documentation
Connector for the pay endpoints of the Binance API
package com.binance4j.pay.client;
import com.binance4j.core.Request;
import com.binance4j.core.client.RestClient;
import com.binance4j.core.param.Params;
import com.binance4j.core.param.TimeFrame;
import com.binance4j.pay.dto.TradeHistory;
import com.binance4j.pay.param.TradeHistoryParams;
/**
* Api client for the pay endpoints
*
* @see Documentation
*/
public class PayClient extends RestClient {
/**
* @param key The API public key.
* @param secret The API secret key.
*/
public PayClient(String key, String secret) {
super(PayMapping.class, key, secret);
}
/**
* Get pay trades.
*
* @return The request to execute.
*/
public Request getTrades() {
return new Request<>(service.getTrades(new TradeHistoryParams().toMap()));
}
/**
* Get pay trades.
*
* @param timeFrame The time frame.
* @return The request to execute.
*/
public Request getTrades(TimeFrame timeFrame) {
return new Request<>(service.getTrades(Params.merge(new TradeHistoryParams(), timeFrame)));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy