Search in sources :

Example 1 with OrderBookPrecision

use of com.github.jnidzwetzki.bitfinex.v2.entity.OrderBookPrecision in project bitfinex-v2-wss-api-java by jnidzwetzki.

the class QuoteManager method unsubscribeExecutedTrades.

/**
 * Unsubscribe a executed trades channel
 * @param currencyPair
 * @param orderBookPrecision
 * @param orderBookFrequency
 * @param pricePoints
 */
public void unsubscribeExecutedTrades(final BitfinexExecutedTradeSymbol tradeSymbol) {
    final int channel = bitfinexApiBroker.getChannelForSymbol(tradeSymbol);
    if (channel == -1) {
        throw new IllegalArgumentException("Unknown symbol: " + tradeSymbol);
    }
    final UnsubscribeChannelCommand command = new UnsubscribeChannelCommand(channel);
    bitfinexApiBroker.sendCommand(command);
    bitfinexApiBroker.removeChannelForSymbol(tradeSymbol);
}
Also used : UnsubscribeChannelCommand(com.github.jnidzwetzki.bitfinex.v2.commands.UnsubscribeChannelCommand)

Example 2 with OrderBookPrecision

use of com.github.jnidzwetzki.bitfinex.v2.entity.OrderBookPrecision in project bitfinex-v2-wss-api-java by jnidzwetzki.

the class RawOrderbookManager method subscribeOrderbook.

/**
 * Subscribe a orderbook
 * @param currencyPair
 * @param orderBookPrecision
 * @param orderBookFrequency
 * @param pricePoints
 */
public void subscribeOrderbook(final RawOrderbookConfiguration orderbookConfiguration) {
    final SubscribeRawOrderbookCommand subscribeOrderbookCommand = new SubscribeRawOrderbookCommand(orderbookConfiguration);
    bitfinexApiBroker.sendCommand(subscribeOrderbookCommand);
}
Also used : SubscribeRawOrderbookCommand(com.github.jnidzwetzki.bitfinex.v2.commands.SubscribeRawOrderbookCommand)

Example 3 with OrderBookPrecision

use of com.github.jnidzwetzki.bitfinex.v2.entity.OrderBookPrecision in project bitfinex-v2-wss-api-java by jnidzwetzki.

the class OrderbookManager method unsubscribeOrderbook.

/**
 * Unsubscribe a orderbook
 * @param currencyPair
 * @param orderBookPrecision
 * @param orderBookFrequency
 * @param pricePoints
 */
public void unsubscribeOrderbook(final OrderbookConfiguration orderbookConfiguration) {
    final int channel = bitfinexApiBroker.getChannelForSymbol(orderbookConfiguration);
    if (channel == -1) {
        throw new IllegalArgumentException("Unknown symbol: " + orderbookConfiguration);
    }
    final UnsubscribeChannelCommand command = new UnsubscribeChannelCommand(channel);
    bitfinexApiBroker.sendCommand(command);
    bitfinexApiBroker.removeChannelForSymbol(orderbookConfiguration);
}
Also used : UnsubscribeChannelCommand(com.github.jnidzwetzki.bitfinex.v2.commands.UnsubscribeChannelCommand)

Example 4 with OrderBookPrecision

use of com.github.jnidzwetzki.bitfinex.v2.entity.OrderBookPrecision in project bitfinex-v2-wss-api-java by jnidzwetzki.

the class OrderbookManager method subscribeOrderbook.

/**
 * Subscribe a orderbook
 * @param currencyPair
 * @param orderBookPrecision
 * @param orderBookFrequency
 * @param pricePoints
 */
public void subscribeOrderbook(final OrderbookConfiguration orderbookConfiguration) {
    final SubscribeOrderbookCommand subscribeOrderbookCommand = new SubscribeOrderbookCommand(orderbookConfiguration);
    bitfinexApiBroker.sendCommand(subscribeOrderbookCommand);
}
Also used : SubscribeOrderbookCommand(com.github.jnidzwetzki.bitfinex.v2.commands.SubscribeOrderbookCommand)

Example 5 with OrderBookPrecision

use of com.github.jnidzwetzki.bitfinex.v2.entity.OrderBookPrecision in project bitfinex-v2-wss-api-java by jnidzwetzki.

the class QuoteManager method subscribeExecutedTrades.

/**
 * Subscribe a executed trade channel
 * @param currencyPair
 * @param orderBookPrecision
 * @param orderBookFrequency
 * @param pricePoints
 */
public void subscribeExecutedTrades(final BitfinexExecutedTradeSymbol tradeSymbol) {
    final SubscribeTradesCommand subscribeOrderbookCommand = new SubscribeTradesCommand(tradeSymbol);
    bitfinexApiBroker.sendCommand(subscribeOrderbookCommand);
}
Also used : SubscribeTradesCommand(com.github.jnidzwetzki.bitfinex.v2.commands.SubscribeTradesCommand)

Aggregations

UnsubscribeChannelCommand (com.github.jnidzwetzki.bitfinex.v2.commands.UnsubscribeChannelCommand)3 SubscribeOrderbookCommand (com.github.jnidzwetzki.bitfinex.v2.commands.SubscribeOrderbookCommand)1 SubscribeRawOrderbookCommand (com.github.jnidzwetzki.bitfinex.v2.commands.SubscribeRawOrderbookCommand)1 SubscribeTradesCommand (com.github.jnidzwetzki.bitfinex.v2.commands.SubscribeTradesCommand)1