use of com.github.jnidzwetzki.bitfinex.v2.entity.RawOrderbookConfiguration in project bitfinex-v2-wss-api-java by jnidzwetzki.
the class RawOrderbookHandler method handleEntry.
/**
* Handle a new orderbook entry
* @param bitfinexApiBroker
* @param configuration
* @param jsonArray
*/
private void handleEntry(final BitfinexApiBroker bitfinexApiBroker, final RawOrderbookConfiguration configuration, final JSONArray jsonArray) {
final long orderId = jsonArray.getNumber(0).longValue();
final BigDecimal price = jsonArray.getBigDecimal(1);
final BigDecimal amount = jsonArray.getBigDecimal(2);
final RawOrderbookEntry orderbookEntry = new RawOrderbookEntry(orderId, price, amount);
bitfinexApiBroker.getRawOrderbookManager().handleNewOrderbookEntry(configuration, orderbookEntry);
}
Aggregations