Search in sources :

Example 1 with BitfinexFundingTradeResponse

use of org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexFundingTradeResponse in project XChange by knowm.

the class BitfinexTradeDemo method raw.

private static void raw(Exchange bfx) throws IOException {
    /*
    BitfinexTradeServiceRaw tradeService = (BitfinexTradeServiceRaw) bfx.getTradeService();
    LimitOrder limitOrder = new LimitOrder.Builder(OrderType.BID, CurrencyPair.BTC_USD).limitPrice(new BigDecimal("481.69"))
        .originalAmount(new BigDecimal("0.001")).build();
    tradeService.placeBitfinexLimitOrder(limitOrder, BitfinexOrderType.LIMIT);
    */
    BitfinexTradeServiceRaw tradeService = (BitfinexTradeServiceRaw) bfx.getTradeService();
    Date tenDaysAgo = Date.from(LocalDate.now().minusDays(10).atStartOfDay(ZoneId.systemDefault()).toInstant());
    BitfinexFundingTradeResponse[] fundingTradeResponses = tradeService.getBitfinexFundingHistory("USD", tenDaysAgo, 2000);
}
Also used : BitfinexFundingTradeResponse(org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexFundingTradeResponse) BitfinexTradeServiceRaw(org.knowm.xchange.bitfinex.service.BitfinexTradeServiceRaw) Date(java.util.Date) LocalDate(java.time.LocalDate)

Aggregations

LocalDate (java.time.LocalDate)1 Date (java.util.Date)1 BitfinexTradeServiceRaw (org.knowm.xchange.bitfinex.service.BitfinexTradeServiceRaw)1 BitfinexFundingTradeResponse (org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexFundingTradeResponse)1