use of com.github.jnidzwetzki.bitfinex.v2.entity.Timeframe in project bitfinex-v2-wss-api-java by jnidzwetzki.
the class QuoteManager method unsubscribeCandles.
/**
* Unsubscribe the candles
* @param currencyPair
* @param timeframe
*/
public void unsubscribeCandles(final BitfinexCandlestickSymbol symbol) {
final int channel = bitfinexApiBroker.getChannelForSymbol(symbol);
if (channel == -1) {
throw new IllegalArgumentException("Unknown symbol: " + symbol);
}
final UnsubscribeChannelCommand command = new UnsubscribeChannelCommand(channel);
bitfinexApiBroker.sendCommand(command);
bitfinexApiBroker.removeChannelForSymbol(symbol);
}
Aggregations