public final class BitstampAdapters extends Object
Modifier and Type | Method and Description |
---|---|
static AccountInfo |
adaptAccountInfo(BitstampBalance bitstampBalance,
String userName)
Adapts a BitstampBalance to a AccountInfo
|
static OrderBook |
adaptOrderBook(BitstampOrderBook bitstampOrderBook,
CurrencyPair currencyPair,
int timeScale)
Adapts a com.xeiam.xchange.bitstamp.api.model.OrderBook to a OrderBook Object
|
static Ticker |
adaptTicker(BitstampTicker bitstampTicker,
CurrencyPair currencyPair)
Adapts a BitstampTicker to a Ticker Object
|
static Trade |
adaptTrade(BitstampTransaction tx,
CurrencyPair currencyPair,
int timeScale)
Adapts a Transaction to a Trade Object
|
static UserTrades |
adaptTradeHistory(BitstampUserTransaction[] bitstampUserTransactions)
Adapt the user's trades
|
static Trades |
adaptTrades(BitstampTransaction[] transactions,
CurrencyPair currencyPair)
Adapts a Transaction[] to a Trades Object
|
static void |
checkArgument(boolean argument,
String msgPattern,
Object... msgArgs) |
static LimitOrder |
createOrder(CurrencyPair currencyPair,
List<BigDecimal> priceAndAmount,
Order.OrderType orderType) |
static List<LimitOrder> |
createOrders(CurrencyPair currencyPair,
Order.OrderType orderType,
List<List<BigDecimal>> orders) |
public static AccountInfo adaptAccountInfo(BitstampBalance bitstampBalance, String userName)
bitstampBalance
- The Bitstamp balanceuserName
- The user namepublic static OrderBook adaptOrderBook(BitstampOrderBook bitstampOrderBook, CurrencyPair currencyPair, int timeScale)
currencyPair
- (e.g. BTC/USD)currency
- The currency (e.g. USD in BTC/USD)timeScale
- polled order books provide a timestamp in seconds, stream in mspublic static List<LimitOrder> createOrders(CurrencyPair currencyPair, Order.OrderType orderType, List<List<BigDecimal>> orders)
public static LimitOrder createOrder(CurrencyPair currencyPair, List<BigDecimal> priceAndAmount, Order.OrderType orderType)
public static void checkArgument(boolean argument, String msgPattern, Object... msgArgs)
public static Trades adaptTrades(BitstampTransaction[] transactions, CurrencyPair currencyPair)
transactions
- The Bitstamp transactionscurrencyPair
- (e.g. BTC/USD)public static Trade adaptTrade(BitstampTransaction tx, CurrencyPair currencyPair, int timeScale)
transactions
- The Bitstamp transactioncurrencyPair
- (e.g. BTC/USD)timeScale
- polled order books provide a timestamp in seconds, stream in mspublic static Ticker adaptTicker(BitstampTicker bitstampTicker, CurrencyPair currencyPair)
bitstampTicker
- The exchange specific tickercurrencyPair
- (e.g. BTC/USD)public static UserTrades adaptTradeHistory(BitstampUserTransaction[] bitstampUserTransactions)
bitstampUserTransactions
- Copyright © 2012–2018 Xeiam, LLC. All rights reserved.