![JAR search and dependency download from the Maven repository](/logo.png)
com.banxa.model.request.GetCryptoCurrenciesRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk Show documentation
Show all versions of java-sdk Show documentation
The Java SDK for integration with Banxa's API
The newest version!
package com.banxa.model.request;
import com.banxa.model.OrderType;
import com.banxa.model.response.GetCryptoCurrenciesResponse;
public class GetCryptoCurrenciesRequest extends GetRequest {
private final OrderType orderType;
private GetCryptoCurrenciesRequest(Builder builder) {
this.orderType = builder.orderType;
}
public GetCryptoCurrenciesRequest(OrderType orderType) {
this.orderType = orderType;
}
public OrderType getOrderType() {
return orderType;
}
@Override
public String getUri() {
return "/api/coins/" + orderType.getType();
}
@Override
public Class getResponseClass() {
return GetCryptoCurrenciesResponse.class;
}
public static Builder createBuyBuilder() {
return new Builder(OrderType.BUY);
}
public static Builder createSellBuilder() {
return new Builder(OrderType.SELL);
}
public static class Builder {
private final OrderType orderType;
public Builder(OrderType orderType) {
this.orderType = orderType;
}
public GetCryptoCurrenciesRequest build() {
return new GetCryptoCurrenciesRequest(this);
}
}}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy