public class DefaultBitoProPublicClient extends Object implements BitoProPublicClient
BitoProPublicClient using HttpClient.BitoProPublicClient.BitoProPublicPairClient| Modifier and Type | Field and Description |
|---|---|
protected CloseableHttpClient |
client |
protected static org.apache.http.Header |
CLIENT_HEADER |
protected com.fasterxml.jackson.databind.ObjectMapper |
om |
| Constructor and Description |
|---|
DefaultBitoProPublicClient() |
DefaultBitoProPublicClient(CloseableHttpClient client) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkStatus(org.apache.http.StatusLine sl,
org.apache.http.HttpEntity entity) |
OrderBook |
getOrderBook(String pair)
Get order book for specific pair.
|
Ticker |
getTicker(String pair)
Get ticker for specific pair.
|
List<Ticker> |
getTickers()
Get tickers for all pairs.
|
List<Trade> |
getTrades(String pair)
Get recent trades for specific pair.
|
protected String |
tryParseError(String body) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPairClientprotected final CloseableHttpClient client
protected final com.fasterxml.jackson.databind.ObjectMapper om
protected static final org.apache.http.Header CLIENT_HEADER
public DefaultBitoProPublicClient(CloseableHttpClient client)
public DefaultBitoProPublicClient()
public Ticker getTicker(String pair) throws IOException
getTicker in interface BitoProPublicClientpair - the pair to get tickerIOException - when connection error occured while called the Rest APIpublic List<Ticker> getTickers() throws IOException
getTickers in interface BitoProPublicClientIOException - when connection error occured while called the Rest APIpublic OrderBook getOrderBook(String pair) throws IOException
getOrderBook in interface BitoProPublicClientpair - the pair to get order bookIOException - when connection error occured while called the Rest APIpublic List<Trade> getTrades(String pair) throws IOException
getTrades in interface BitoProPublicClientpair - the pair to get tradesIOException - when connection error occured while called the Rest APIprotected void checkStatus(org.apache.http.StatusLine sl,
org.apache.http.HttpEntity entity)
throws IOException
IOException