Class BitfinexAdapters
java.lang.Object
org.knowm.xchange.bitfinex.service.BitfinexAdapters
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringadaptBitfinexCurrency(String bitfinexSymbol) static CurrencyPairadaptCurrencyPair(String bitfinexSymbol) static Stringstatic StringadaptCurrencyPairsToTickersParam(Collection<CurrencyPair> currencyPairs) static Map<Instrument,Fee> adaptDynamicTradingFees(BitfinexTradingFeeResponse[] responses, List<Instrument> currencyPairs) Each element in the response array contains a set of currencies that are at a given fee tier.static FixedRateLoanOrderadaptFixedRateLoanOrder(String currency, BigDecimal amount, int dayPeriod, String direction, String id, BigDecimal rate) static List<FixedRateLoanOrder>adaptFixedRateLoanOrders(BitfinexLendLevel[] orders, String currency, String orderType, String id) static FloatingRateLoanOrderadaptFloatingRateLoanOrder(String currency, BigDecimal amount, int dayPeriod, String direction, String id, BigDecimal rate) static List<FloatingRateLoanOrder>adaptFloatingRateLoanOrders(BitfinexLendLevel[] orders, String currency, String orderType, String id) static List<FundingRecord>adaptFundingHistory(List<Movement> movementHistorys) static List<FundingRecord>adaptFundingHistory(BitfinexDepositWithdrawalHistoryResponse[] bitfinexDepositWithdrawalHistoryResponses) static ExchangeMetaDataadaptMetaData(List<CurrencyPair> currencyPairs, ExchangeMetaData metaData) static ExchangeMetaDataadaptMetaData(BitfinexAccountFeesResponse accountFeesResponse, int platformStatus, boolean platformStatusPresent, ExchangeMetaData metaData) static ExchangeMetaDataadaptMetaData(BitfinexAccountInfosResponse[] bitfinexAccountInfos, ExchangeMetaData exchangeMetaData) static ExchangeMetaDataadaptMetaData(ExchangeMetaData exchangeMetaData, List<BitfinexSymbolDetail> symbolDetails, Map<CurrencyPair, BigDecimal> lastPrices) Flipped order of arguments to avoid type-erasure clash withadaptMetaData(List, ExchangeMetaData)static LimitOrderadaptOrder(BigDecimal originalAmount, BigDecimal price, CurrencyPair currencyPair, Order.OrderType orderType, Date timestamp) static OrderBookadaptOrderBook(BitfinexDepth btceDepth, CurrencyPair currencyPair) static BitfinexOrderTypeadaptOrders(BitfinexLevel[] bitfinexLevels, CurrencyPair currencyPair, Order.OrderType orderType) static OpenOrdersadaptOrders(BitfinexOrderStatusResponse[] activeOrders) static Order.OrderStatusstatic Stringstatic TradeadaptPublicTrade(BitfinexPublicTrade trade, CurrencyPair currencyPair) static TradesadaptPublicTrades(BitfinexPublicTrade[] trades, CurrencyPair currencyPair) static TickeradaptTicker(BitfinexTicker bitfinexTicker, CurrencyPair currencyPair) static TickeradaptTicker(BitfinexTicker bitfinexTicker) static TradeadaptTrade(BitfinexTrade trade, CurrencyPair currencyPair) static UserTradesadaptTradeHistory(BitfinexTradeResponse[] trades, String symbol) static UserTradesadaptTradeHistoryV2(List<Trade> trades) static TradesadaptTrades(BitfinexTrade[] trades, CurrencyPair currencyPair) adaptWallets(BitfinexBalancesResponse[] response) static BitfinexTicker[]adoptBitfinexTickers(List<com.fasterxml.jackson.databind.node.ArrayNode> tickers)
-
Field Details
-
log
public static final org.slf4j.Logger log
-
-
Method Details
-
adaptDynamicTradingFees
public static Map<Instrument,Fee> adaptDynamicTradingFees(BitfinexTradingFeeResponse[] responses, List<Instrument> currencyPairs) Each element in the response array contains a set of currencies that are at a given fee tier. The API returns the fee per currency in each tier and does not make any promises that they are all the same, so this adapter will use the fee per currency instead of the fee per tier. -
adaptBitfinexCurrency
-
adaptOrderType
-
adaptOrderFlagsToType
-
adaptCurrencyPair
-
adaptOrderStatus
-
adaptCurrencyPair
-
adaptOrderBook
-
adaptOrders
public static BitfinexAdapters.OrdersContainer adaptOrders(BitfinexLevel[] bitfinexLevels, CurrencyPair currencyPair, Order.OrderType orderType) -
adaptOrder
public static LimitOrder adaptOrder(BigDecimal originalAmount, BigDecimal price, CurrencyPair currencyPair, Order.OrderType orderType, Date timestamp) -
adaptFixedRateLoanOrders
public static List<FixedRateLoanOrder> adaptFixedRateLoanOrders(BitfinexLendLevel[] orders, String currency, String orderType, String id) -
adaptFixedRateLoanOrder
public static FixedRateLoanOrder adaptFixedRateLoanOrder(String currency, BigDecimal amount, int dayPeriod, String direction, String id, BigDecimal rate) -
adaptFloatingRateLoanOrders
public static List<FloatingRateLoanOrder> adaptFloatingRateLoanOrders(BitfinexLendLevel[] orders, String currency, String orderType, String id) -
adaptFloatingRateLoanOrder
public static FloatingRateLoanOrder adaptFloatingRateLoanOrder(String currency, BigDecimal amount, int dayPeriod, String direction, String id, BigDecimal rate) -
adaptTrade
-
adaptTrades
-
adaptTicker
-
adaptWallets
-
adaptOrders
-
adaptTradeHistory
-
adaptTradeHistoryV2
-
adaptMetaData
public static ExchangeMetaData adaptMetaData(List<CurrencyPair> currencyPairs, ExchangeMetaData metaData) -
adaptMetaData
public static ExchangeMetaData adaptMetaData(ExchangeMetaData exchangeMetaData, List<BitfinexSymbolDetail> symbolDetails, Map<CurrencyPair, BigDecimal> lastPrices) Flipped order of arguments to avoid type-erasure clash withadaptMetaData(List, ExchangeMetaData)- Parameters:
exchangeMetaData- The exchange metadata provided from bitfinex.json.symbolDetails- The symbol data fetced from Bitfinex.- Returns:
- The combined result.
-
adaptMetaData
public static ExchangeMetaData adaptMetaData(BitfinexAccountFeesResponse accountFeesResponse, int platformStatus, boolean platformStatusPresent, ExchangeMetaData metaData) -
adaptMetaData
public static ExchangeMetaData adaptMetaData(BitfinexAccountInfosResponse[] bitfinexAccountInfos, ExchangeMetaData exchangeMetaData) -
adaptFundingHistory
-
adaptFundingHistory
public static List<FundingRecord> adaptFundingHistory(BitfinexDepositWithdrawalHistoryResponse[] bitfinexDepositWithdrawalHistoryResponses) -
adaptCurrencyPairsToTickersParam
-
adaptTicker
-
adaptPublicTrade
-
adaptPublicTrades
-
adoptBitfinexTickers
public static BitfinexTicker[] adoptBitfinexTickers(List<com.fasterxml.jackson.databind.node.ArrayNode> tickers) throws IOException - Throws:
IOException
-