Package org.knowm.xchange.bitcoinde.v4
Class BitcoindeAdapters
java.lang.Object
org.knowm.xchange.bitcoinde.v4.BitcoindeAdapters
-
Method Summary
Modifier and TypeMethodDescriptionstatic AccountInfo
adaptAccountInfo
(BitcoindeAccountWrapper bitcoindeAccount) Adapt a org.knowm.xchange.bitcoinde.dto.marketdata.BitcoindeAccount object to an AccountInfo object.static OrderBook
adaptCompactOrderBook
(BitcoindeCompactOrderbookWrapper bitcoindeOrderbookWrapper, CurrencyPair currencyPair) Adapt a org.knowm.xchange.bitcoinde.dto.marketdata.BitcoindeOrderBook object to an OrderBook object.static List<FundingRecord>
adaptFundingHistory
(Currency currency, List<BitcoindeAccountLedger> accountLedgers, boolean leaveFeesSeperate) static FundingRecord.Type
static OpenOrders
adaptOpenOrders
(BitcoindeMyOrdersWrapper bitcoindeOpenOrdersWrapper) static OrderBook
adaptOrderBook
(BitcoindeOrderbookWrapper asksWrapper, BitcoindeOrderbookWrapper bidsWrapper, CurrencyPair currencyPair) static Order.OrderStatus
static Order.OrderType
adaptOrderType
(BitcoindeType type) static UserTrades
adaptTradeHistory
(BitcoindeMyTradesWrapper bitcoindeMyTradesWrapper) Helper function for adapting a BitcoindeMyTradesWrapper into a list of trades sorting them with respect to their timestamps.static UserTrades
adaptTradeHistory
(BitcoindeMyTradesWrapper bitcoindeMyTradesWrapper, Trades.TradeSortType sortType) Adapt a BitcoindeMyTradesWrapper into a list of trades.static Trades
adaptTrades
(BitcoindeTradesWrapper bitcoindeTradesWrapper, CurrencyPair currencyPair) Adapt a org.knowm.xchange.bitcoinde.dto.marketdata.BitcoindeTrade[] object to a Trades object.static List<LimitOrder>
createCompactOrders
(CurrencyPair currencyPair, Order.OrderType orderType, BitcoindeCompactOrder[] orders) Create a list of orders from a list of asks or bids.static LimitOrder
createOrder
(CurrencyPair currencyPair, BitcoindeOrder bitcoindeOrder, Order.OrderType orderType, String orderId, Date timeStamp) Create an individual order.
-
Method Details
-
adaptCompactOrderBook
public static OrderBook adaptCompactOrderBook(BitcoindeCompactOrderbookWrapper bitcoindeOrderbookWrapper, CurrencyPair currencyPair) Adapt a org.knowm.xchange.bitcoinde.dto.marketdata.BitcoindeOrderBook object to an OrderBook object.- Parameters:
bitcoindeOrderbookWrapper
- the exchange specific OrderBook objectcurrencyPair
- (e.g. BTC/USD)- Returns:
- The XChange OrderBook
-
adaptOrderBook
public static OrderBook adaptOrderBook(BitcoindeOrderbookWrapper asksWrapper, BitcoindeOrderbookWrapper bidsWrapper, CurrencyPair currencyPair) -
createCompactOrders
public static List<LimitOrder> createCompactOrders(CurrencyPair currencyPair, Order.OrderType orderType, BitcoindeCompactOrder[] orders) Create a list of orders from a list of asks or bids. -
createOrder
public static LimitOrder createOrder(CurrencyPair currencyPair, BitcoindeOrder bitcoindeOrder, Order.OrderType orderType, String orderId, Date timeStamp) Create an individual order. -
adaptTrades
public static Trades adaptTrades(BitcoindeTradesWrapper bitcoindeTradesWrapper, CurrencyPair currencyPair) Adapt a org.knowm.xchange.bitcoinde.dto.marketdata.BitcoindeTrade[] object to a Trades object.- Parameters:
bitcoindeTradesWrapper
- Exchange specific tradescurrencyPair
- (e.g. BTC/USD)- Returns:
- The XChange Trades
-
adaptAccountInfo
Adapt a org.knowm.xchange.bitcoinde.dto.marketdata.BitcoindeAccount object to an AccountInfo object.- Parameters:
bitcoindeAccount
-- Returns:
- AccountInfo
-
adaptFundingHistory
public static List<FundingRecord> adaptFundingHistory(Currency currency, List<BitcoindeAccountLedger> accountLedgers, boolean leaveFeesSeperate) -
adaptFundingRecordType
-
adaptTradeHistory
Helper function for adapting a BitcoindeMyTradesWrapper into a list of trades sorting them with respect to their timestamps.- Parameters:
bitcoindeMyTradesWrapper
-- Returns:
- the list of trades parsed from the API without any modifications
-
adaptTradeHistory
public static UserTrades adaptTradeHistory(BitcoindeMyTradesWrapper bitcoindeMyTradesWrapper, Trades.TradeSortType sortType) Adapt a BitcoindeMyTradesWrapper into a list of trades.- Parameters:
bitcoindeMyTradesWrapper
-sortType
- Sort the trades with respect to their IDs or timestamps.- Returns:
- UserTrades
-
adaptOpenOrders
- Parameters:
bitcoindeOpenOrdersWrapper
-- Returns:
-
adaptOrderType
-
adaptOrderStatus
-