code: @Override
      public void handleChannelData(final String action, final JSONArray payload) throws BitfinexClientException {
          logger.info("Got position callback {}", payload.toString());
  
          ArrayList<BitfinexPosition> positions = Lists.newArrayList();
          // No positions active
          if (payload.isEmpty()) {
              positionConsumer.accept(symbol, positions);
              return;
          }
  
          if (payload.get(0) instanceof JSONArray) {
              // snapshot
              for (int orderPos = 0; orderPos < payload.length(); orderPos++) {
                  final JSONArray orderArray = payload.getJSONArray(orderPos);
                  BitfinexPosition position = jsonArrayToPosition(orderArray);
                  positions.add(position);
              }
          } else {
              // update
              BitfinexPosition position = jsonArrayToPosition(payload);
              positions.add(position);
          }
          positionConsumer.accept(symbol, positions);
      }
docs: {@inheritDoc}